Exemple #1
0
 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];
 }
Exemple #2
0
    public void Awake()
    {
        if (IsInitialed)
        {
            return;
        }
        CGameRootCfg.CreateCfg();

        Application.targetFrameRate = 60;
        DontDestroyOnLoad(gameObject);
        mConfig = CGameRootCfg.mCfgs[(int)mConfigType];
    }
Exemple #3
0
    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();
    }
Exemple #4
0
 public void Awake()
 {
     //游戏生命期内不进行销毁
     DontDestroyOnLoad(this.gameObject);
     mConfig = CGameRootCfg.mGame;
 }
Exemple #5
0
 public void Awake()
 {
     DontDestroyOnLoad(gameObject);
     mConfig = CGameRootCfg.mCfgs[(int)mConfigType];
 }