public void LoadData() { string[] tempIconAssets = this.ReadData(); for (int i = 0; i < tempIconAssets.Length; i++) { BagItme bagItme = new BagItme(tempIconAssets[i], i); BagItmes.Add(bagItme); } }
public void LoadInitData() { BagItme bagFrameItem = bagManger.GetFrameItem(); Font font = Resources.Load <Font>("arial"); for (int i = 0; i < playerBagItmeManager.PlayerBagItems.Count; i++) { int playItmeIndex = playerBagItmeManager.PlayerBagItems[i].PlayerBagID; BagItme bagItme = bagManger.GetBagItme(playItmeIndex); BagViewItem bagViewItem = new BagViewItem(parent); bagViewItem.BagText.text = bagItme.BagId.ToString(); bagViewItem.BagIccon.sprite = bagItme.GetSprite; bagViewItem.UpdateFrameIcon(bagFrameItem.GetSprite); bagViewItem.UpdateFront(font); BagView.Add(bagViewItem); } }