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