Exemplo n.º 1
0
    public void Init()
    {
        mCampSystem         = new CampSystem();
        mCharacterSystem    = new CharacterSystem();
        mEnergySystem       = new EnergySystem();
        mGameEventSystem    = new GameEventSystem();
        mStageSystem        = new StageSystem();
        mArchievementSystem = new AchievementSystem();

        mCampInfoUI      = new CampInfoUI();
        mGamePauseUI     = new GamePauseUI();
        mGameStateInfoUI = new GameStateInfoUI();
        mSoldierInfoUI   = new SoldierInfoUI();

        mCampSystem.Init();
        mCharacterSystem.Init();
        mEnergySystem.Init();
        mGameEventSystem.Init();
        mStageSystem.Init();
        mArchievementSystem.Init();

        mCampInfoUI.Init();
        mGamePauseUI.Init();
        mGameStateInfoUI.Init();
        mSoldierInfoUI.Init();

        LoadMemento();//加载快照数据
    }
Exemplo n.º 2
0
    //最好先Awake, 再Init. Awake中初始化数据, Init中再new对象之类的
    //不然部分new对象比较分散的,就不好给System初始化进行排序,有耦合。比如EventSubject
    public void Init()
    {
        m_AchievementSystem = new AchievementSystem();
        m_CampSystem        = new CampSystem();
        m_CharactorSystem   = new CharacterSystem();
        m_EnergySystem      = new EnergySystem();
        m_GameEventSystem   = new GameEventSystem();
        m_StageSystem       = new StageSystem();
        m_FileDataSystem    = new FileDataSystem();


        m_CampInfoUI      = new CampInfoUI();
        m_GamePauseUI     = new GamePauseUI();
        m_GameStateInfoUI = new GameStateInfoUI();
        m_SolderInfoUI    = new SoldierInfoUI();

        m_FileDataSystem.Init();
        m_AchievementSystem.Init();
        m_CampSystem.Init();
        m_CharactorSystem.Init();
        m_EnergySystem.Init();
        m_GameEventSystem.Init();
        m_StageSystem.Init();

        m_CampInfoUI.Init();
        m_GamePauseUI.Init();
        m_GameStateInfoUI.Init();
        m_SolderInfoUI.Init();
        LoadMemento();
    }