Added remove method

Added add slot method
Added comments
This commit is contained in:
julius
2022-02-12 12:14:40 +01:00
parent 9201677c1b
commit f0a5fe201c
3 changed files with 85 additions and 75 deletions

View File

@@ -11,13 +11,17 @@ public class InventoryController : MonoBehaviour
private void Awake()
{
inventory = transform.GetComponent<Inventory>();
inventory.createEmptyInventory(5);
Debug.Log(inventory.addItemAt(0, item1, 8));
Debug.Log(inventory.addItemAt(0, item1, 1));
Debug.Log(inventory.addItemAt(3, item2, 15));
inventory.createEmptyInventory(5,10);
inventory.addItemAt(0, item1, 8);
inventory.addItemAt(0, item1, 1);
inventory.addItemAt(3, item2, 15);
/*
Debug.Log(inventory.addItemAt(0, item2, 15));
Debug.Log(inventory.getInventory[0].Count);
Debug.Log(inventory.removeItemAt(0, 10));
Debug.Log(inventory.getInventory[0].Count);
*/
uiInventory.setInventory(inventory);
}
void Start()