added Item changing Sprite when hovering over Slot in Shop or Inventory

This commit is contained in:
dhain 2022-06-03 09:29:24 +02:00
parent fe63511825
commit 24fa26ddb2
11 changed files with 46 additions and 23 deletions

View file

@ -19,10 +19,11 @@ public class ShopSlot : ItemStorageSlot {
* Clears the Shop Slot
*/
public override void ClearSlot() {
base.ClearSlot();
nameText.text = "";
costText.text = "";
amountText.text = "";
// _shop.RemoveItem(Item, 1);
base.ClearSlot();
}
/**
@ -35,7 +36,6 @@ public class ShopSlot : ItemStorageSlot {
_playerController.ChangeMoney(-Item.cost);
Debug.Log("Buying Item: " + Item.displayName);
Debug.Log("money left: " + _playerController.Money);
} else {
Debug.Log("Not enough money to buy item.");
}