mirror of
				https://github.com/DerTyp7/example-top-down-unity.git
				synced 2025-10-30 21:07:09 +01:00 
			
		
		
		
	Added remove method
Added add slot method Added comments
This commit is contained in:
		| @@ -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() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 julius
					julius