Exemplo n.º 1
0
 private void OnStateNoneAnimationComplete()
 {
     this.mCurPopup.gameObject.SetActive(false);
     UnityEngine.Object.Destroy(this.mCurPopup.gameObject);
     this.mButtonBlocker.gameObject.SetActive(false);
     UnityEngine.Object.Destroy(this.mButtonBlocker.gameObject);
     this.mCurPopup = null;
     this.mButtonBlocker = null;
     this.mStateStack.Clear();
     if (this.mPopClosedCallbackEvent != null)
     {
         this.mPopClosedCallbackEvent();
     }
     if (this.mPopClosedCallbackEvent2 != null)
     {
         this.mPopClosedCallbackEvent2();
     }
 }
Exemplo n.º 2
0
 private GameUIBasePopup CreatePopup(GameUIPopupManager.eSTATE eState)
 {
     this.mStringBuilder.Remove(0, this.mStringBuilder.Length);
     this.mStringBuilder.Append("GUI/").Append(eState.ToString());
     GameObject gameObject = Res.LoadGUI(this.mStringBuilder.ToString());
     if (gameObject == null)
     {
         global::Debug.LogError(new object[]
         {
             "Res.Load GUI/MessageTip error"
         });
         return null;
     }
     GameObject gameObject2 = NGUITools.AddChild(GameUIManager.mInstance.uiCamera.gameObject, gameObject);
     if (gameObject2 == null)
     {
         global::Debug.LogError(new object[]
         {
             "AddChild error"
         });
         return null;
     }
     GameUIBasePopup gameUIBasePopup = gameObject2.GetComponent(eState.ToString()) as GameUIBasePopup;
     if (gameUIBasePopup == null)
     {
         gameUIBasePopup = (gameObject2.AddComponent(eState.ToString()) as GameUIBasePopup);
     }
     gameUIBasePopup.gameObject.SetActive(true);
     GameObject gameObject3 = Res.LoadGUI("GUI/GameUIButtonBlocker");
     if (gameObject3 == null)
     {
         global::Debug.LogError(new object[]
         {
             "Res.Load GUI/GameUIButtonBlocker error"
         });
         return null;
     }
     this.mButtonBlocker = NGUITools.AddChild(GameUIManager.mInstance.uiCamera.gameObject, gameObject3);
     UIEventListener expr_13A = UIEventListener.Get(this.mButtonBlocker);
     expr_13A.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_13A.onClick, new UIEventListener.VoidDelegate(this.OnButtonBlockerClick));
     this.mCurPopup = gameUIBasePopup;
     this.SetCurrentPopupPanel(5400, 400, 3000);
     return gameUIBasePopup;
 }