fixed first Shop Slot

started on shop switcher button (for animal shop)
This commit is contained in:
dhain 2022-06-23 15:01:13 +02:00
parent b0ab924037
commit acd602c85a
11 changed files with 286 additions and 143 deletions

View file

@ -48,10 +48,10 @@ public class InventoryUI : MonoBehaviour {
private void UpdateUI() {
// Add all items to the correct slots, clear the ones where no item should be and set the number of how many items are in the slot
for(int i = 0; i < _slots.Length; i++) {
if(i < _inventory.elements.Count) {
_slots[i].AddElement(_inventory.elements.ElementAt(i).Key);
_slots[i].amountText.text = "" + _inventory.elements[_inventory.elements.ElementAt(i).Key];
if(_inventory.elements[_inventory.elements.ElementAt(i).Key] == 1) {
if(i < _inventory.Elements.Count) {
_slots[i].AddElement(_inventory.Elements.ElementAt(i).Key);
_slots[i].amountText.text = "" + _inventory.Elements[_inventory.Elements.ElementAt(i).Key];
if(_inventory.Elements[_inventory.Elements.ElementAt(i).Key] == 1) {
_slots[i].amountText.text = "";
}
} else {