public int Get(Utils.InventoryObjectType objectType) { switch (objectType) { case Utils.InventoryObjectType.Water: { return(inventory[Utils.waterInventoryIndex]); } case Utils.InventoryObjectType.Food: { return(inventory[Utils.foodInventoryIndex]); } case Utils.InventoryObjectType.Wood: { return(inventory[Utils.woodInventoryIndex]); } case Utils.InventoryObjectType.Nails: { return(inventory[Utils.nailsInventoryIndex]); } default: return(0); } }
public void Add(Utils.InventoryObjectType objectType) { Debug.Log("Adding " + objectType); switch (objectType) { case Utils.InventoryObjectType.Water: { AddWater(); break; } case Utils.InventoryObjectType.Food: { AddFood(); break; } case Utils.InventoryObjectType.Wood: { AddWood(); break; } case Utils.InventoryObjectType.Nails: { AddNails(); break; } default: break; } }
public void Remove(Utils.InventoryObjectType objectType) { GenericRemoval((int)objectType); }