// Use this for initialization void Start() { Application.runInBackground = true; foreach (ItemClass itm in ItemsManager.Items.Values) { if (!(itm is ItemFood)) { continue; } guiIconPanel panel = ItemsScroll.AddItem <guiIconPanel>(); panel.ItemID = itm.item_id; panel.Amount = 10; panel.OnPanelClick = OnPanelClick; } PlayerData.Health = 1; Selected.gameObject.SetActive(false); }
public InventoryItem(int idx) { index = idx; Panel = Game.CreateResource <guiIconPanel>("interface/Panel"); }
public InventoryItem(int idx) { index = idx; Panel = Game.CreateResource<guiIconPanel>("interface/Panel"); }