Exemplo n.º 1
0
 private void InitItems()
 {
     foreach (var kv in ItemManager.Instance.Items)
     {
         if (kv.Value.itemDefine.Type == ItemType.Ride /*&& kv.Value.itemDefine.LimitClass == CharacterClass.None|| kv.Value.itemDefine.LimitClass ==User.Instance.CurrentCharacter.Class*/)
         {
             GameObject go = Instantiate(itemPrefan, this.ListMain.transform);
             go.SetActive(true);
             UIRideItem ui = go.GetComponent <UIRideItem>();
             ui.SetRideItem(kv.Value, this, false);
             this.ListMain.AddItem(ui);
         }
     }
 }
Exemplo n.º 2
0
 private void InitItems()
 {
     foreach (var kv in ItemManager.Instance.Items)
     {
         if (kv.Value.Define.Type == ItemType.Ride && (kv.Value.Define.LimitClass == CharacterClass.None || kv.Value.Define.LimitClass == User.Instance.CurrentCharacterInfo.Class))
         {
             if (EquipManager.Instance.Contains(kv.Key))
             {
                 continue;
             }
             GameObject go = Instantiate(itemPrefab, this.listMain.transform);
             UIRideItem ui = go.GetComponent <UIRideItem>();
             ui.SetEquipItem(kv.Value, this, false);
             this.listMain.AddItem(ui);
         }
     }
 }
Exemplo n.º 3
0
 private void OnItemSelected(ListView.ListViewItem item)
 {
     this.selectedItem  = item as UIRideItem;
     this.descript.text = this.selectedItem.item.itemDefine.Description;
 }