private void Awake() { // Master MasterView viewMaster = Instantiate( masterView ); viewMaster.Initialize( gameSetting.masterSetting ); Master master = new Master( viewMaster ); MasterAIControl masterControl = new MasterAIControl( master ); // AI List<AIControl> AIControlList = new List<AIControl>(); List<Character> AICharacter = new List<Character>(); for ( int i = 0; i < AINumber; ++i ) { CharacterView view = Instantiate( characterPrefab ); view.Initialize( gameSetting.characterSetting ); Character character = new Character( view ); AIControl aiControl = new AIControl( gameSetting.AIControlSetting, character, master ); AIControlList.Add( aiControl ); AICharacter.Add( character ); } // Player CharacterView playerView = Instantiate( characterPrefab ); playerView.Initialize( gameSetting.characterSetting ); Character player = new Character( playerView ); PlayerControl playerControl = new PlayerControl( player, AICharacter ); GameTime gameTime = new GameTime(); controllerManager = new ControllerManager(playerControl, AIControlList, masterControl); gameManager = new GameManager( gameTime, controllerManager, player, AICharacter, master ); successPanel.SetGameTime( gameTime ); }
private void Awake() { // Master MasterView viewMaster = Instantiate(masterView); viewMaster.Initialize(gameSetting.masterSetting); Master master = new Master(viewMaster); MasterAIControl masterControl = new MasterAIControl(master); // AI List <AIControl> AIControlList = new List <AIControl>(); List <Character> AICharacter = new List <Character>(); for (int i = 0; i < AINumber; ++i) { CharacterView view = Instantiate(characterPrefab); view.Initialize(gameSetting.characterSetting); Character character = new Character(view); AIControl aiControl = new AIControl(gameSetting.AIControlSetting, character, master); AIControlList.Add(aiControl); AICharacter.Add(character); } // Player CharacterView playerView = Instantiate(characterPrefab); playerView.Initialize(gameSetting.characterSetting); Character player = new Character(playerView); PlayerControl playerControl = new PlayerControl(player, AICharacter); GameTime gameTime = new GameTime(); controllerManager = new ControllerManager(playerControl, AIControlList, masterControl); gameManager = new GameManager(gameTime, controllerManager, player, AICharacter, master); successPanel.SetGameTime(gameTime); }
public ControllerManager(PlayerControl playerControl, List <AIControl> AICharacterList, MasterAIControl masterControl) { this.AICharacterList = AICharacterList; this.playerControl = playerControl; this.masterControl = masterControl; }
public ControllerManager( PlayerControl playerControl, List<AIControl> AICharacterList, MasterAIControl masterControl ) { this.AICharacterList = AICharacterList; this.playerControl = playerControl; this.masterControl = masterControl; }