public override void CreateGame(Games gameMode) { switch (gameMode) { case Games.Classic: playerOneLevel = new Level(PlayerIndex.One); playerTwoLevel = new Level(PlayerIndex.Two); break; case Games.Tug: playerOneLevel = new Tug_Of_War(PlayerIndex.One); playerTwoLevel = new Tug_Of_War(PlayerIndex.Two); break; case Games.Line: playerOneLevel = new LineEmUp(PlayerIndex.One); playerTwoLevel = new LineEmUp(PlayerIndex.Two); break; case Games.Pick: playerOneLevel = new PicknDrop(PlayerIndex.One); playerTwoLevel = new PicknDrop(PlayerIndex.Two); break; case Games.Switch: playerOneLevel = new SwitcharooBuckaroo(PlayerIndex.One); playerTwoLevel = new SwitcharooBuckaroo(PlayerIndex.Two); break; case Games.Nightmare: playerOneLevel = new Nightmare(PlayerIndex.One); playerTwoLevel = new Nightmare(PlayerIndex.Two); break; default: Console.WriteLine("The gamemode " + gameMode + " isn't supported in local multiplayer."); overlordReference.ReturnToMenu(); break; } playerOneController.SetLevelReference(playerOneLevel); playerOneController.SetGameMode(gameMode); playerOneLevel.gameClassReference = this; playerTwoController.SetLevelReference(playerTwoLevel); playerTwoController.SetGameMode(gameMode); playerTwoLevel.gameClassReference = this; gameState = GameState.InGame; base.CreateGame(gameMode); }
public override void CreateGame(Games gameMode) { switch (gameMode) { case Games.OnlineClassic: player = new Level(PlayerIndex.One); otherPlayer = new Level(PlayerIndex.Two); break; case Games.OnlineTug: player = new Tug_Of_War(PlayerIndex.One); otherPlayer = new Tug_Of_War(PlayerIndex.Two); break; case Games.OnlineLine: player = new LineEmUp(PlayerIndex.One); otherPlayer = new LineEmUp(PlayerIndex.Two); break; case Games.OnlinePick: player = new PicknDrop(PlayerIndex.One); otherPlayer = new PicknDrop(PlayerIndex.Two); break; case Games.OnlineSwitch: player = new SwitcharooBuckaroo(PlayerIndex.One); otherPlayer = new SwitcharooBuckaroo(PlayerIndex.Two); break; case Games.OnlineNightmare: player = new Nightmare(PlayerIndex.One); otherPlayer = new Nightmare(PlayerIndex.Two); break; case Games.OnlineDoubleTrouble: player = new DoubleTrouble(); break; default: Console.WriteLine("The gamemode " + gameMode + " isn't supported in online multiplayer."); break; } playerController.SetLevelReference(player); playerController.SetGameMode(gameMode); player.gameClassReference = this; otherPlayer.gameClassReference = this; gameState = GameState.InGame; }