void Start() { if (PhotonNetwork.room == null) { return; } if (SINGLETON == null) { SINGLETON = this; } else { Debug.LogWarning("There are more than one controller"); } if (!PhotonNetwork.isMasterClient) { requestUpdateGameStatus(); } _bridgePos_1 = _bridge_1.transform.position; _bridgePos_2 = _bridge_2.transform.position; _bridgeRot_1 = _bridge_1.transform.rotation; _bridgeRot_2 = _bridge_2.transform.rotation; InvokeRepeating("slowUpdate", 0.2f, 0.2f); InvokeRepeating("timer", 1f, 1f); // MusicManager.SINGLETON.SetMusic (MusicManager.COMBAT_STATUS.IN_COMBAT); }
public void OnRestart() { this._checkLoginRecovery = true; PvpManager.ResetState(); if (this._curState == null) { return; } if (this._curState.StateCode != PvpStateCode.Home) { this.ChangeState(new PvpStateHome()); } }
private void OpenHomeViews() { HomeGCManager.Instance.DoClearToHome(); base.OpenViews(); CtrlManager.OpenWindow(WindowID.MainBg, null); CtrlManager.OpenWindow(WindowID.MenuView, null); CtrlManager.OpenWindow(WindowID.MenuBottomBarView, null); CtrlManager.OpenWindow(WindowID.MenuTopBarView, null); if (LevelManager.CurBattleType != 0) { if (LevelManager.CurBattleType == 6) { CtrlManager.OpenWindow(WindowID.ArenaModeView, null); CtrlManager.OpenWindow(WindowID.CardView, null); } else if (LevelManager.CurBattleType == 9) { CtrlManager.OpenWindow(WindowID.ArenaModeView, null); CtrlManager.OpenWindow(WindowID.XLDView, null); } else if (LevelManager.Instance.IsZyBattleType || LevelManager.CurBattleType == 2) { CtrlManager.OpenWindow(WindowID.ArenaModeView, null); if (LevelManager.Instance.IsServerZyBattleType) { Singleton <PveManager> .Instance.ResetState(); PvpManager.ResetState(); } } else if (LevelManager.Instance.IsPvpBattleType) { if (!Singleton <PvpManager> .Instance.IsObserver) { CtrlManager.OpenWindow(WindowID.ArenaModeView, null); } PvpManager.ResetState(); } else if (LevelManager.CurBattleType != 11) { CtrlManager.OpenWindow(WindowID.ArenaModeView, null); } } PvpLevelStorage.CheckFightAgain(); }
private void OpenHomeViews() { HomeGCManager.Instance.DoClearToHome(); base.OpenViews(); CtrlManager.CloseWindow(WindowID.BgView); CtrlManager.OpenWindow(WindowID.MainBg, null); CtrlManager.OpenWindow(WindowID.MenuView, null); CtrlManager.OpenWindow(WindowID.MenuBottomBarView, null); CtrlManager.OpenWindow(WindowID.MenuTopBarView, null); if (LevelManager.CurBattleType != 0) { if (LevelManager.CurBattleType == 6) { CtrlManager.OpenWindow(WindowID.ArenaModeView, null); CtrlManager.OpenWindow(WindowID.CardView, null); } else if (LevelManager.CurBattleType == 9) { CtrlManager.OpenWindow(WindowID.ArenaModeView, null); CtrlManager.OpenWindow(WindowID.XLDView, null); } else if (LevelManager.Instance.IsZyBattleType || LevelManager.CurBattleType == 2) { CtrlManager.OpenWindow(WindowID.ArenaModeView, null); if (LevelManager.Instance.IsServerZyBattleType) { Singleton <PveManager> .Instance.ResetState(); PvpManager.ResetState(); } } else if (LevelManager.Instance.IsPvpBattleType) { if (!Singleton <PvpManager> .Instance.IsObserver) { CtrlManager.OpenWindow(WindowID.ArenaModeView, null); } PvpManager.ResetState(); } else if (LevelManager.CurBattleType != 11) { CtrlManager.OpenWindow(WindowID.ArenaModeView, null); } } PvpLevelStorage.CheckFightAgain(); TimeSpan t = ModelManager.Instance.Get_loginTime_diff_X(); DateTime d = ModelManager.Instance.Get_loginTime_DataTime(); DateTime dateTime = d + t; bool flag = true; if (dateTime.Day == d.Day) { int isPass = ModelManager.Instance.Get_GetSignDay_X().isPass; if (isPass == 1) { CtrlManager.OpenWindow(WindowID.SignView, null); flag = false; } } else { Singleton <MenuView> .Instance.SetNews(6, "0"); } if (flag) { this.OpenActivityView(); } else { MobaMessageManager.RegistMessage(ClientV2C.signView_close, new MobaMessageFunc(this.OnMsg_OnSignViewClose)); } Singleton <MenuView> .Instance.OpenSummonerRegisterView(); }