public override void InitState(GameObjectManager[] objectManagerArray, MainGame owner) { base.InitState(objectManagerArray, owner); _listOfGameState = new List <GameState>(); _menubg = (Background)objectManagerArray[0].CreateObject(0); //Index = 0; StateMenu _stateMenu = new StateMenu(); _stateMenu.InitState(objectManagerArray, owner); _stateMenu.GameStateOwner = this; //Index = 1 StateLoadGame _stateLoadGame = new StateLoadGame(); _stateLoadGame.InitState(objectManagerArray, owner); _stateLoadGame.GameStateOwner = this; //Index = 2 StateOptions _stateOptions = new StateOptions(); _stateOptions.InitState(objectManagerArray, owner); _stateOptions.GameStateOwner = this; //Index = 3 StateHelps _stateHelps = new StateHelps(); _stateHelps.InitState(objectManagerArray, owner); _stateHelps.GameStateOwner = this; //Index = 4 StateIntro _stateIntro = new StateIntro(); _stateIntro.InitState(objectManagerArray, owner); _stateIntro.GameStateOwner = this; _listOfGameState.Add(_stateMenu); _listOfGameState.Add(_stateLoadGame); _listOfGameState.Add(_stateOptions); _listOfGameState.Add(_stateHelps); _listOfGameState.Add(_stateIntro); }
public override void InitState(GameObjectManager[] objectManagerArray, MainGame owner) { base.InitState(objectManagerArray, owner); _listOfGameState = new List<GameState>(); _menubg = (Background)objectManagerArray[0].CreateObject(0); //Index = 0; StateMenu _stateMenu = new StateMenu(); _stateMenu.InitState(objectManagerArray, owner); _stateMenu.GameStateOwner = this; //Index = 1 StateLoadGame _stateLoadGame = new StateLoadGame(); _stateLoadGame.InitState(objectManagerArray, owner); _stateLoadGame.GameStateOwner = this; //Index = 2 StateOptions _stateOptions = new StateOptions(); _stateOptions.InitState(objectManagerArray, owner); _stateOptions.GameStateOwner = this; //Index = 3 StateHelps _stateHelps = new StateHelps(); _stateHelps.InitState(objectManagerArray, owner); _stateHelps.GameStateOwner = this; //Index = 4 StateIntro _stateIntro = new StateIntro(); _stateIntro.InitState(objectManagerArray, owner); _stateIntro.GameStateOwner = this; _listOfGameState.Add(_stateMenu); _listOfGameState.Add(_stateLoadGame); _listOfGameState.Add(_stateOptions); _listOfGameState.Add(_stateHelps); _listOfGameState.Add(_stateIntro); }