// 初始P-BaseDefense遊戲相關設定 public void Initinal() { // 場景狀態控制 m_bGameOver = false; // 遊戲系統 m_GameEventSystem = new GameEventSystem(this); // 遊戲事件系統 m_CampSystem = new CampSystem(this); // 兵營系統 m_StageSystem = new StageSystem(this); // 關卡系統 m_CharacterSystem = new CharacterSystem(this); // 角色管理系統 m_ApSystem = new APSystem(this); // 行動力系統 m_AchievementSystem = new AchievementSystem(this); // 成就系統 // 界面 m_CampInfoUI = new CampInfoUI(this); // 兵營資訊 m_SoldierInfoUI = new SoldierInfoUI(this); // Soldier資訊 m_GameStateInfoUI = new GameStateInfoUI(this); // 遊戲資料 m_GamePauseUI = new GamePauseUI(this); // 遊戲暫停 // 注入到其它系統 EnemyAI.SetStageSystem(m_StageSystem); // 載入存檔 LoadData(); // 註冊遊戲事件系統 ResigerGameEvent(); }
public void Init() { mArchievementSystem = new ArchievementSystem(); mCampSystem = new CampSystem(); mCharacterSystem = new CharacterSystem(); mEnergySystem = new EnergySystem(); mGameEventSystem = new GameEventSystem(); mStageSystem = new StageSystem(); mCampInfoUI = new CampInfoUI(); mGamePauseUI = new GamePauseUI(); mGameStateInfoUI = new GameStateInfoUI(); mSoldierInfoUI = new SoldierInfoUI(); mArchievementSystem.Init(); mCampSystem.Init(); mCharacterSystem.Init(); mEnergySystem.Init(); mGameEventSystem.Init(); mStageSystem.Init(); mCampInfoUI.Init(); mGamePauseUI.Init(); mGameStateInfoUI.Init(); mSoldierInfoUI.Init(); LoadMemento(); }
// 初始P-BaseDefense游戏相关设定 public void Initinal() { // 场景状态控制 m_bGameOver = false; // 游戏系统 m_GameEventSystem = new GameEventSystem(this); // 游戏事件系统 m_CampSystem = new CampSystem(this); // 兵营系统 m_StageSystem = new StageSystem(this); // 关卡系统 m_CharacterSystem = new CharacterSystem(this); // 角色管理系统 m_ApSystem = new APSystem(this); // 行动力系统 m_AchievementSystem = new AchievementSystem(this); // 成就系统 // 界面 m_CampInfoUI = new CampInfoUI(this); // 兵营信息 m_SoldierInfoUI = new SoldierInfoUI(this); // Soldier信息 m_GameStateInfoUI = new GameStateInfoUI(this); // 游戏资料 m_GamePauseUI = new GamePauseUI(this); // 游戏暂停 // 注入到其它系统 EnemyAI.SetStageSystem(m_StageSystem); // 载入存档 LoadData(); // 注册游戏事件系统 ResigerGameEvent(); }
public void Init() { systems = new List <IGameSystem>(); achievementSystem = new AchievementSystem(); campSystem = new CampSystem(); CharacterSystem = new CharacterSystem(); EnergySystem = new EnergySystem(); EventSystem = new GameEventSystem(); StageSystem = new StageSystem(); CampInfoUI = new CampInfoUI(); gamePauseUI = new GamePauseUI(); GameStateInfoUI = new GameStateInfoUI(); soldierInfoUI = new SoldierInfoUI(); systems.Add(achievementSystem); systems.Add(campSystem); systems.Add(CharacterSystem); systems.Add(EnergySystem); systems.Add(EventSystem); systems.Add(StageSystem); systems.Add(CampInfoUI); systems.Add(gamePauseUI); systems.Add(GameStateInfoUI); systems.Add(soldierInfoUI); systems.ForEach(s => s.Init()); var memento = CareTaker.RetrieveMemento(); //取回备忘录 achievementSystem.RestoreMemento(memento); //根据备忘录,恢复成就系统 }
public override void OnRelease() { CampInfoUI.OnRelease(); GamePauseUI.OnRelease(); GameStateUI.OnRelease(); SoliderInfoUI.OnRelease(); }
// 初始P-BaseDefense遊戲相關設定 public void Initinal() { // 場景狀態控制 m_bGameOver = false; // 遊戲系統 m_GameEventSystem = new GameEventSystem(this); // 遊戲事件系統 m_CampSystem = new CampSystem(this); // 兵營系統 m_StageSystem = new StageSystem(this); // 關卡系統 m_CharacterSystem = new CharacterSystem(this); // 角色管理系統 m_ApSystem = new APSystem(this); // 行動力系統 m_AchievementSystem = new AchievementSystem(this); // 成就系統 // 界面 m_CampInfoUI = new CampInfoUI(this); // 兵營資訊 m_SoldierInfoUI = new SoldierInfoUI(this); // Soldier資訊 m_GameStateInfoUI = new GameStateInfoUI(this); // 遊戲資料 m_GamePauseUI = new GamePauseUI (this); // 遊戲暫停 // 注入到其它系統 EnemyAI.SetStageSystem( m_StageSystem ); // 載入存檔 LoadData(); // 註冊遊戲事件系統 ResigerGameEvent(); }
private SoldierInfoUI m_SoldierInfoUI; //战士信息 public void Init() { m_ArchievementSystem = new ArchievementSystem(); m_CampSystem = new CampSystem(); m_CharacterSystem = new CharacterSystem(); m_EnergySystem = new EnergySystem(); m_GameEventSystem = new GameEventSystem(); m_StageSystem = new StageSystem(); m_CampInfoUI = new CampInfoUI(); m_GamePauseUI = new GamePauseUI(); m_GameStateInfoUI = new GameStateInfoUI(); m_SoldierInfoUI = new SoldierInfoUI(); m_ArchievementSystem.Init(); m_CampSystem.Init(); m_CharacterSystem.Init(); m_EnergySystem.Init(); m_GameEventSystem.Init(); m_StageSystem.Init(); m_CampInfoUI.Init(); m_GamePauseUI.Init(); m_GameStateInfoUI.Init(); m_SoldierInfoUI.Init(); }
//最好先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(); }
public override void OnInit() { CampInfoUI = new CampInfoUI(); GamePauseUI = new GamePauseUI(); GameStateUI = new GameStateUI(); SoliderInfoUI = new SoldierInfoUI(); CampInfoUI.OnInit(); GamePauseUI.OnInit(); GameStateUI.OnInit(); SoliderInfoUI.OnInit(); }
public void Initial() { bGameOver = false; //游戏系统 gameEventSystem = new GameEventSystem(this); campSystem = new CampSystem(this); stageSystem = new StageSystem(this); characterSystem = new CharacterSystem(this); apSystem = new APSystem(this); achievementSystem = new AchievementSystem(this); //界面 campInfoUI = new CampInfoUI(this); soldierInfoUI = new SoldierInfoUI(this); gameStateInfoUI = new GameStateInfoUI(this); }
// Init RTSGame. public void Initinal() { // Scene Control. m_bGameOver = false; // Game System. m_GameEventSystem = new GameEventSystem(this); m_CampSystem = new CampSystem(this); m_StageSystem = new StageSystem(this); m_CharacterSystem = new CharacterSystem(this); m_APSystem = new APSystem(this); m_AchievementSystem = new AchievementSystem(this); // UI m_CampInfoUI = new CampInfoUI(this); m_GamePauseUI = new GamePauseUI(this); m_GameStateInfoUI = new GameStateInfoUI(this); m_SoldierInfoUI = new SoldierInfoUI(this); }