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(); } } }
private void AwakeTryLoadFromFile() { if (DevLevelConfigData.configFromScene) { this.LEVEL_PATH = DevLevelConfigData.LEVEL_PATH; this.LEVEL_MODE = DevLevelConfigData.LEVEL_MODE; this.stageDevData = DevLevelConfigData.stageDevData; this.avatarDevDatas = DevLevelConfigData.avatarDevDatas; this.monsterDevDatas = DevLevelConfigData.monsterDevDatas; this.isBenchmark = DevLevelConfigData.isBenchmark; GlobalVars.IS_BENCHMARK = this.isBenchmark; this.avatarCount = DevLevelConfigData.avatarDevDatas.Count; if (this.isBenchmark) { this.pariticleMode = true; } this.avatarTypeNames = new List <string>(); foreach (DevAvatarData data in this.avatarDevDatas) { this.avatarTypeNames.Add(data.avatarType); } } else { MainUIData.USE_VIEW_CACHING = false; GeneralLogicManager.InitAll(); GlobalDataManager.Refresh(); } }
private void Start() { MainUIData.USE_VIEW_CACHING = false; GeneralLogicManager.InitAll(); GlobalDataManager.Refresh(); if (< > f__am$cacheE == null) {
public void Awake() { GlobalVars.DISABLE_NETWORK_DEBUG = this.disableNetWork; SuperDebug.DEBUG_SWITCH[6] = true; MainUIData.USE_VIEW_CACHING = false; GeneralLogicManager.InitAll(); Singleton <MainUIManager> .Instance.SetMainCanvas(this); string[] soundBankNames = new string[] { "All_In_One_Bank", "BK_Global", "BK_Events" }; Singleton <WwiseAudioManager> .Instance.PushSoundBankScale(soundBankNames); Singleton <IslandModule> .Instance.InitTechTree(); }
public void Awake() { GraphicsSettingUtil.SetTargetFrameRate(60); GeneralLogicManager.InitOnGameStart(); Singleton <MainUIManager> .Instance.SetMainCanvas(this); this.assetbundleRetryTimes = 0; this._status = Status.Default; this._retryAssetBundleWaitTimer = 0f; this._videoPlayer = base.transform.Find("Video/VideoPlayer").GetComponent <MediaPlayer>(); this._videoPlayer.Events.AddListener(new UnityAction <MediaPlayer, MediaPlayerEvent.EventType, ErrorCode>(this.OnVideoEvent)); this._videoPlayer.gameObject.SetActive(false); this._videoDisplay = base.transform.Find("Video/VideoDisplay").GetComponent <DisplayIMGUI>(); this._videoDisplay.gameObject.SetActive(false); base.transform.Find("Video/BlackPanel").gameObject.SetActive(false); base.transform.Find("Video").gameObject.SetActive(false); }
private void Awake() { Screen.sleepTimeout = -1; GlobalVars.DISABLE_NETWORK_DEBUG = true; MainUIData.USE_VIEW_CACHING = false; GeneralLogicManager.InitAll(); GlobalDataManager.Refresh(); Singleton <LevelScoreManager> .Create(); Singleton <LevelScoreManager> .Instance.luaFile = "Lua/Levels/Common/Level 0.lua"; UnityEngine.Object.FindObjectOfType <MonoDebugMP>().onPeerReady = new Action <MPPeer>(this.OnPeerReady); base.Awake(); Singleton <LevelManager> .Instance.levelActor.AddPlugin(new MPDevLevelActorPlugin(this)); this._established = false; this.InitGUI(); }
public override void SwitchAccountFinishedCallBack(string param) { GeneralLogicManager.RestartGame(); }
public void OnRestartGameCallBack() { this.Destroy(); GeneralLogicManager.RestartGame(); }
private void OnDataAssetReady() { GeneralLogicManager.InitOnDataAssetReady(true, new Action(this.AfterDataAssetReady)); }
public void ReloadCallBack(string param) { GeneralLogicManager.RestartGame(); }