public void init(PlayerModel playerModel) { this.playerModel = playerModel; inventoryItems = new List<InventoryItem>(); equippedView = GetComponentInChildren<EquippedView>(); equippedView.Init(); for (int i = 0; i < playerModel.inventory.Count; i++) { addItem(playerModel.inventory[i]); } updateView(); itemInfo.close(); }
public void init(PlayerModel playerModel) { this.playerModel = playerModel; inventoryItems = new List <InventoryItem>(); equippedView = GetComponentInChildren <EquippedView>(); equippedView.Init(); for (int i = 0; i < playerModel.inventory.Count; i++) { addItem(playerModel.inventory[i]); } updateView(); itemInfo.close(); }