Merchant.SellToPlayer
#
Declarationpublic void SellToPlayer(Inventory playerInventory, GDTKItem item)
#
ParametersName | Description |
---|---|
playerInventory | Player's Inventory |
item | Item to sell |
#
DescriptionSells item to player (using Count Select settings)
#
Usageusing NullSave.GDTK.Inventory;using UnityEngine;
public class Example : MonoBehaviour{
public void ExampleMethod(Merchant target, Inventory other) { target.SellToPlayer(other, target.items[0]); }
}
#
Declarationpublic void SellToPlayer(Inventory playerInventory, GDTKItem item, Int32 count)
#
ParametersName | Description |
---|---|
playerInventory | Player's Inventory |
item | Item to sell |
count | Number of the item |
#
DescriptionSells a specific number of an item to player
#
Usageusing NullSave.GDTK.Inventory;using UnityEngine;
public class Example : MonoBehaviour{
public void ExampleMethod(Merchant target, Inventory other) { target.SellToPlayer(other, target.items[0], 1); }
}