Example #1
0
 public void Init(Transform parent, GameUIPopupManager.PopClosedCallback callback)
 {
     this.CreateObjects();
     Transform transform = base.transform;
     transform.parent = parent;
     transform.localPosition = new Vector3(0f, 0f, -1000f);
     transform.localScale = Vector3.one;
     this.mCloseCallback = callback;
     this.ShowLevelupPanel();
     Globals.Instance.EffectSoundMgr.Play("ui/ui_014");
     this.levelBtnClose = this.levelupWinBg.transform.FindChild("closeBtn").gameObject;
     UIEventListener expr_86 = UIEventListener.Get(this.levelBtnClose);
     expr_86.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_86.onClick, new UIEventListener.VoidDelegate(this.OnLevelBtnCloseClick));
     UIEventListener expr_C6 = UIEventListener.Get(this.levelupBg.transform.FindChild("resultWindow").gameObject);
     expr_C6.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_C6.onClick, new UIEventListener.VoidDelegate(this.OnLevelBtnCloseClick));
 }
Example #2
0
 public void PushState(GameUIPopupManager.eSTATE eState, bool isCloseNow = false, GameUIPopupManager.PopClosedCallback cb = null, GameUIPopupManager.PopClosedCallback cb2 = null)
 {
     this.mPushShowedCallbackEvent = cb;
     this.mPopClosedCallbackEvent2 = cb2;
     if (this.GetState() != eState)
     {
         this.mStateStack.Push(eState);
         if (eState == GameUIPopupManager.eSTATE.None)
         {
             this.SetStateNone(isCloseNow);
         }
         else
         {
             if (this.mCurPopup != null)
             {
                 this.mCurPopup.gameObject.SetActive(false);
                 UnityEngine.Object.Destroy(this.mCurPopup.gameObject);
                 this.mButtonBlocker.gameObject.SetActive(false);
                 UnityEngine.Object.Destroy(this.mButtonBlocker.gameObject);
             }
             this.CreatePopup(eState);
             this.StartAnimation();
         }
     }
 }
Example #3
0
 public void PopState(bool isCloseNow = false, GameUIPopupManager.PopClosedCallback cb = null)
 {
     this.mPopClosedCallbackEvent = cb;
     if (this.mStateStack.Count <= 1)
     {
         this.SetStateNone(isCloseNow);
     }
     else
     {
         this.EndAnimation(isCloseNow);
     }
 }