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

@ -46,11 +46,11 @@ public class ShopUI : MonoBehaviour {
private void UpdateUI() {
// Add all items to the correct slots and clear the ones where no item should be
for (int i = 0; i < _slots.Length; i++) {
if (i < _shop.elements.Count) {
_slots[i].AddElement(_shop.elements.ElementAt(i).Key);
if (i < _shop.Elements.Count) {
_slots[i].AddElement(_shop.Elements.ElementAt(i).Key);
_slots[i].nameText.text = _slots[i].Element.displayName;
_slots[i].costText.text = _slots[i].Element.price + " µ";
_slots[i].amountText.text = _shop.elements[_shop.elements.ElementAt(i).Key] + " #";
_slots[i].amountText.text = _shop.Elements[_shop.Elements.ElementAt(i).Key] + " #";
}
else {
_slots[i].ClearSlot();