Exemplo n.º 1
0
 private void SelectItem(int quality, bool isShowEffect)
 {
     if (this == null || base.get_gameObject() == null || quality <= 0)
     {
         return;
     }
     if (this.mLastSelectItem != null)
     {
         this.mLastSelectItem.IsSelect = false;
     }
     this.mLastSelectItem = this.mTramcarList.Find((TramcarItem e) => e.Data.quality == quality);
     if (this.mLastSelectItem != null)
     {
         this.mLastSelectItem.IsSelect = true;
     }
     if (isShowEffect)
     {
         this.mFxId = FXSpineManager.Instance.ReplaySpine(this.mFxId, 4801, this.mLastSelectItem.get_transform(), "TramcarUI", 2001, null, "UI", 35f, -225f, 1f, 1f, false, FXMaskLayer.MaskState.None);
     }
 }
Exemplo n.º 2
0
 private void CreateTramcar(KuangChePinZhi data)
 {
     if (data != null)
     {
         TramcarItem tramcarItem = this.mTramcarList.Find((TramcarItem e) => e.get_gameObject().get_name() == "Unused");
         if (tramcarItem == null)
         {
             GameObject instantiate2Prefab = ResourceManager.GetInstantiate2Prefab("TramcarItem");
             UGUITools.SetParent(this.mTramcarPanel, instantiate2Prefab, false);
             tramcarItem = instantiate2Prefab.GetComponent <TramcarItem>();
             this.mTramcarList.Add(tramcarItem);
         }
         tramcarItem.SetData(data);
         tramcarItem.get_gameObject().set_name("Tramcar" + data.quality);
         tramcarItem.get_gameObject().SetActive(true);
         if (this.mLastSelectItem != null)
         {
             tramcarItem.IsSelect = (this.mLastSelectItem.Data.quality == data.quality);
         }
     }
 }