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