public void Awake() { mInstance = this; DontDestroyOnLoad(gameObject); DontDestroyOnLoad(UINodesManager.UIRoot); CGameRootCfg.mCfgs[0] = null; CGameRootCfg.mCfgs[(int)EGameRootCfgType.Game] = CGameRootCfg.mGame; CGameRootCfg.mCfgs[(int)EGameRootCfgType.EditorBase] = CGameRootCfg.mEditorBase; mConfig = CGameRootCfg.mCfgs[(int)mConfigType]; }
public void Awake() { if (IsInitialed) { return; } CGameRootCfg.CreateCfg(); Application.targetFrameRate = 60; DontDestroyOnLoad(gameObject); mConfig = CGameRootCfg.mCfgs[(int)mConfigType]; }
public void OnDestroy() { if (mSystems != null) { for (int i = mSystems.Length - 1; i >= 0; --i) { mSystems[i].SysFinalize(); DestroyImmediate(mSystems[i]); } } UnLoad(); StopAllCoroutines(); _GameRoot = null; mSystems = null; mConfig = null; mLeaveSystems.Clear(); mEnterSystems.Clear(); mSystemMap.Clear(); }
public void Awake() { //游戏生命期内不进行销毁 DontDestroyOnLoad(this.gameObject); mConfig = CGameRootCfg.mGame; }
public void Awake() { DontDestroyOnLoad(gameObject); mConfig = CGameRootCfg.mCfgs[(int)mConfigType]; }