コード例 #1
0
        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();
                }
            }
        }
コード例 #2
0
 public override void SwitchAccountFinishedCallBack(string param)
 {
     GeneralLogicManager.RestartGame();
 }
コード例 #3
0
 public void OnRestartGameCallBack()
 {
     this.Destroy();
     GeneralLogicManager.RestartGame();
 }
コード例 #4
0
 public void ReloadCallBack(string param)
 {
     GeneralLogicManager.RestartGame();
 }