Foerming/Assets/Scripts/InventorySlot.cs
dhain ee6704abc1 added ItemStorage.cs, ItemStorageSlot.cs, ItemStorageUI.cs
* Inventory, InventorySlot, InventoryUI, Shop, ShopSlot, ShopUI are extending them
2022-06-02 15:08:21 +02:00

15 lines
No EOL
415 B
C#

using UnityEngine;
public class InventorySlot : ItemStorageSlot {
/**
* Gets called when the Inventory Slot is clicked
*/
public override void UseItem() {
if(Item.GetType() == typeof(UsableItem)) {
((UsableItem) Item).Select();
Debug.Log("using " + Item.displayName);
} else {
Debug.Log("Item not usable " + Item.displayName);
}
}
}