private void OnDestroy()
 {
     GameUtility.DestroyGameObject((Component)this.mCurrentPreview);
     this.mCurrentPreview = (UnitPreview)null;
     if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.mPreviewUnitRT, (UnityEngine.Object)null))
     {
         RenderTexture.ReleaseTemporary(this.mPreviewUnitRT);
         this.mPreviewUnitRT = (RenderTexture)null;
     }
     if (!UnityEngine.Object.op_Inequality((UnityEngine.Object) this.mMessageWindow, (UnityEngine.Object)null))
     {
         return;
     }
     UnityEngine.Object.Destroy((UnityEngine.Object)((Component)this.mMessageWindow).get_gameObject());
     this.mMessageWindow = (LoginBonusWindow)null;
 }
Example #2
0
 public override void Update(HomeWindow self)
 {
     if (this.mReq != null)
     {
         if (!this.mReq.isDone)
         {
             return;
         }
         if (Object.op_Inequality(this.mReq.asset, (Object)null))
         {
             this.mInstance = Object.Instantiate(this.mReq.asset) as GameObject;
             LoginBonusWindow component1 = (LoginBonusWindow)this.mInstance.GetComponent <LoginBonusWindow>();
             if (Object.op_Inequality((Object)component1, (Object)null))
             {
                 component1.TableID = this.mLoginBonusType;
             }
             LoginBonusWindow28days component2 = (LoginBonusWindow28days)this.mInstance.GetComponent <LoginBonusWindow28days>();
             if (Object.op_Inequality((Object)component2, (Object)null))
             {
                 component2.TableID = this.mLoginBonusType;
             }
         }
         this.mReq = (LoadRequest)null;
     }
     if (!Object.op_Equality((Object)this.mInstance, (Object)null))
     {
         return;
     }
     if (MonoSingleton <GameManager> .Instance.Player.HasQueuedLoginBonus)
     {
         self.mStateMachine.GotoState <HomeWindow.State_LoginBonus>();
     }
     else
     {
         self.NotifyNewFriendRequests();
         self.NotifySupportResult();
         self.CheckTrophies();
         if (GameUtility.isLoginInfoDisplay())
         {
             self.mStateMachine.GotoState <HomeWindow.State_News>();
         }
         else
         {
             self.mStateMachine.GotoState <HomeWindow.State_Default>();
         }
     }
 }
Example #3
0
 public override void Update(HomeWindow self)
 {
     if (this.mReq != null)
     {
         if (!this.mReq.isDone)
         {
             return;
         }
         if (UnityEngine.Object.op_Inequality(this.mReq.asset, (UnityEngine.Object)null))
         {
             this.mInstance = UnityEngine.Object.Instantiate(this.mReq.asset) as GameObject;
             LoginBonusWindow component1 = (LoginBonusWindow)this.mInstance.GetComponent <LoginBonusWindow>();
             if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component1, (UnityEngine.Object)null))
             {
                 component1.TableID = this.mLoginBonusType;
             }
             LoginBonusWindow28days component2 = (LoginBonusWindow28days)this.mInstance.GetComponent <LoginBonusWindow28days>();
             if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component2, (UnityEngine.Object)null))
             {
                 component2.TableID = this.mLoginBonusType;
             }
         }
         this.mReq = (LoadRequest)null;
     }
     if (!UnityEngine.Object.op_Equality((UnityEngine.Object) this.mInstance, (UnityEngine.Object)null))
     {
         return;
     }
     if (MonoSingleton <GameManager> .Instance.Player.HasQueuedLoginBonus)
     {
         self.mStateMachine.GotoState <HomeWindow.State_LoginBonus>();
     }
     else if (GameUtility.isLoginInfoDisplay())
     {
         self.mStateMachine.GotoState <HomeWindow.State_News>();
     }
     else if (!self.mBeginnerShown)
     {
         self.mBeginnerShown = true;
         self.mStateMachine.GotoState <HomeWindow.State_BeginnerNotify>();
     }
     else
     {
         self.MiscBeforeDefaultState();
         self.mStateMachine.GotoState <HomeWindow.State_Default>();
     }
 }