added ItemStorage.cs, ItemStorageSlot.cs, ItemStorageUI.cs
* Inventory, InventorySlot, InventoryUI, Shop, ShopSlot, ShopUI are extending them
This commit is contained in:
parent
d28a1947eb
commit
ee6704abc1
13 changed files with 231 additions and 205 deletions
|
|
@ -20,8 +20,6 @@ public class ShopUI : MonoBehaviour {
|
|||
foreach(ShopSlot slot in _slots) {
|
||||
slot.icon.raycastTarget = false;
|
||||
}
|
||||
|
||||
UpdateUI();
|
||||
}
|
||||
|
||||
private void Update() {
|
||||
|
|
@ -46,8 +44,8 @@ public class ShopUI : MonoBehaviour {
|
|||
for(int i = 0; i < _slots.Length; i++) {
|
||||
if(i < _shop.items.Count) {
|
||||
_slots[i].AddItem(_shop.items.ElementAt(i).Key);
|
||||
_slots[i].nameText.text = _slots[i].item.displayName;
|
||||
_slots[i].costText.text = _slots[i].item.cost + " €";
|
||||
_slots[i].nameText.text = _slots[i].Item.displayName;
|
||||
_slots[i].costText.text = _slots[i].Item.cost + " €";
|
||||
_slots[i].amountText.text = _shop.items[_shop.items.ElementAt(i).Key] + " #";
|
||||
} else {
|
||||
_slots[i].ClearSlot();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue