private void OnApplicationPause(bool paused) { if (Singleton <LevelManager> .Instance != null) { Singleton <LevelManager> .Instance.SetPause(paused); } if (paused) { this._timeEnterBG = TimeUtil.Now; } else { bool flag = false; if ((MiscData.Config != null) && MiscData.Config.BasicConfig.IsRestartWhenGameResume) { TimeSpan span = (TimeSpan)(TimeUtil.Now - this._timeEnterBG); if (((span.TotalSeconds > MiscData.Config.BasicConfig.RestartGameTimeSpanSeconds) && (Singleton <NetworkManager> .Instance != null)) && Singleton <NetworkManager> .Instance.alreadyLogin) { flag = true; GeneralLogicManager.RestartGame(); } } if (!flag && (Singleton <PlayerModule> .Instance != null)) { Singleton <ApplicationManager> .Instance.DetectCheat(); } if (!flag) { Singleton <AccountManager> .Instance.manager.ShowPausePage(); Singleton <AccountManager> .Instance.manager.ShowToolBar(); } } }
public override void SwitchAccountFinishedCallBack(string param) { GeneralLogicManager.RestartGame(); }
public void OnRestartGameCallBack() { this.Destroy(); GeneralLogicManager.RestartGame(); }
public void ReloadCallBack(string param) { GeneralLogicManager.RestartGame(); }