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

@ -35,7 +35,7 @@ public class ItemStorage : MonoBehaviour {
* Removes the specified amount of items in the Item Storage
*/
public void RemoveItem(Item item, int amount) {
if(items[item] <= 0) {
if(items[item]-amount <= 0) {
items.Remove(item);
} else {
items[item] -= amount;