fixed first Shop Slot
started on shop switcher button (for animal shop)
This commit is contained in:
parent
b0ab924037
commit
acd602c85a
11 changed files with 286 additions and 143 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue