예제 #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
 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();
     }
 }
예제 #3
0
 private void Start()
 {
     MainUIData.USE_VIEW_CACHING = false;
     GeneralLogicManager.InitAll();
     GlobalDataManager.Refresh();
     if (< > f__am$cacheE == null)
     {
예제 #4
0
        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();
        }
예제 #5
0
        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);
        }
예제 #6
0
        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();
        }
예제 #7
0
 public override void SwitchAccountFinishedCallBack(string param)
 {
     GeneralLogicManager.RestartGame();
 }
예제 #8
0
 public void OnRestartGameCallBack()
 {
     this.Destroy();
     GeneralLogicManager.RestartGame();
 }
예제 #9
0
 private void OnDataAssetReady()
 {
     GeneralLogicManager.InitOnDataAssetReady(true, new Action(this.AfterDataAssetReady));
 }
예제 #10
0
 public void ReloadCallBack(string param)
 {
     GeneralLogicManager.RestartGame();
 }