Ejemplo n.º 1
0
 private void PlayEffect()
 {
     if (!this.mGoDescPanel.get_activeSelf())
     {
         int            id   = GodWeaponManager.Instance.UIPlayQueue.Dequeue();
         HolyWeaponInfo info = GodWeaponManager.Instance.WeaponList.Find((HolyWeaponInfo e) => e.Id == id);
         if (info != null)
         {
             this.SwitchGodType(info.Type);
             this.mGoListPanel.SetActive(true);
             this.mGoDescPanel.SetActive(false);
             this.mTempItem = this.mItemList.Find((GodWeaponItem e) => e.Info.Id == info.Id);
             if (this.mTempItem != null)
             {
                 int num = this.mTempItem.Index - 2;
                 if (num < 0)
                 {
                     num = 0;
                 }
                 this.mScrollRect.Move2Index(num, false);
                 if (Mathf.Abs(this.mLastIndex - num) > 2)
                 {
                     this.mDelayScrollId = TimerHeap.AddTimer(750u, 0, new Action(this.DelayPlayEffect));
                 }
                 else
                 {
                     this.DelayPlayEffect();
                 }
                 this.mLastIndex = num;
             }
         }
     }
 }
Ejemplo n.º 2
0
    private void CreateWeaponItem(int index, HolyWeaponInfo data)
    {
        GodWeaponItem godWeaponItem = this.mItemList.Find((GodWeaponItem e) => e.get_gameObject().get_name() == "Unused");

        if (godWeaponItem == null)
        {
            GameObject instantiate2Prefab = ResourceManager.GetInstantiate2Prefab("GodWeaponItem");
            UGUITools.SetParent(this.mListGrid.get_gameObject(), instantiate2Prefab, false);
            godWeaponItem = instantiate2Prefab.GetComponent <GodWeaponItem>();
            godWeaponItem.EventHandler = new Action <int, HolyWeaponInfo>(this.OpenDescPanel);
            this.mItemList.Add(godWeaponItem);
        }
        godWeaponItem.SetData(index, data);
        godWeaponItem.get_gameObject().set_name(data.Id.ToString());
        godWeaponItem.get_gameObject().SetActive(true);
    }
Ejemplo n.º 3
0
 protected override void OnEnable()
 {
     base.OnEnable();
     CurrenciesUIViewModel.Show(true);
     CurrenciesUIViewModel.Instance.SetSubUI(true, ResourceManager.GetCodeSprite(110045), string.Empty, delegate
     {
         if (this.mGoDescPanel.get_activeSelf())
         {
             this.CloseDescPanel();
         }
         else
         {
             this.Show(false);
             SoundManager.SetBGMFade(true);
         }
     }, false);
     if (GodWeaponManager.Instance.OpenDescId > 0)
     {
         HolyWeaponInfo info = GodWeaponManager.Instance.WeaponList.Find((HolyWeaponInfo e) => e.Id == GodWeaponManager.Instance.OpenDescId);
         if (info != null)
         {
             this.SwitchGodType(info.Type);
             GodWeaponItem godWeaponItem = this.mItemList.Find((GodWeaponItem e) => e.Info.Id == info.Id);
             if (godWeaponItem != null)
             {
                 this.OpenDescPanel(godWeaponItem.Index, godWeaponItem.Info);
             }
         }
         GodWeaponManager.Instance.OpenDescId = 0;
     }
     else if (GodWeaponManager.Instance.UIPlayQueue != null && GodWeaponManager.Instance.UIPlayQueue.get_Count() > 0)
     {
         this.PlayEffect();
     }
     else
     {
         this.SwitchGodType(1);
         this.mGoDescPanel.SetActive(false);
         this.mGoListPanel.SetActive(true);
     }
     WaitUI.CloseUI(0u);
 }