fixes
This commit is contained in:
parent
470aeff3f3
commit
d2c90c3b7f
3 changed files with 10 additions and 7 deletions
|
|
@ -29,6 +29,7 @@ public class Inventory : MonoBehaviour {
|
|||
}
|
||||
|
||||
public void tempAddItem(Item item) {
|
||||
Debug.Log("AWSD");
|
||||
AddItem(item, 1);
|
||||
}
|
||||
|
||||
|
|
@ -38,13 +39,15 @@ public class Inventory : MonoBehaviour {
|
|||
return;
|
||||
}
|
||||
|
||||
Debug.Log("ASDADADWDASDWD");
|
||||
|
||||
if(!items.ContainsKey(item)) {
|
||||
items.Add(item, amount);
|
||||
} else {
|
||||
items[item] += amount;
|
||||
}
|
||||
|
||||
|
||||
|
||||
onItemChangedCallback?.Invoke();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue