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