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); } }
public void Add(BagViewItem bagViewItem) { BagViewItems.Add(bagViewItem); }