Пример #1
0
 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);
     }
 }
Пример #2
0
        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);
            }
        }