public KeybroadController(OurMarioGame TheGame) { Game = TheGame; IPlayer Player = Game.gameStateManager.world.Mario; MappingDictionary = new Dictionary <Keys, ICommand> { { Keys.Q, new PressQToQuitCommand(Game) }, //{ Keys.R, new PressRToResetCommand(Game)}, { Keys.A, new MarioTurnLeftCommand(Player) }, { Keys.Left, new MarioTurnLeftCommand(Player) }, { Keys.D, new MarioTurnRightCommand(Player) }, { Keys.Right, new MarioTurnRightCommand(Player) }, { Keys.S, new MarioGoDownCommand(TheGame.gameStateManager) }, { Keys.Down, new MarioGoDownCommand(TheGame.gameStateManager) }, { Keys.W, new MarioGoUpCommand(TheGame.gameStateManager) }, { Keys.Up, new MarioGoUpCommand(TheGame.gameStateManager) }, //{ Keys.U, new MarioTurnBigCommand(Player) }, //{ Keys.Y, new MarioTurnSmallCommand(Player) }, //{ Keys.I, new MarioTurnFireCommand(Player) }, //{ Keys.O, new MarioTurnDeadCommand(Player) }, //{ Keys.M, new MouseCommand(Game)}, { Keys.B, new MarioPowerupCommand(Player) }, { Keys.LeftShift, new MarioFireBallCommand(Player) }, { Keys.Enter, new ActionCommand(TheGame.gameStateManager) }, }; }
public GameStateManager(OurMarioGame game) { isBlack = false; state = new MenuState(this); world = WorldFactory.CreateWorldDeveloper(); CheatCodeManager = new AllCheatCodesManager(this); GameClass = game; Totaltimer = Util.Instance.TotalTimer; }
public GamepadController(OurMarioGame TheGame) { OurMarioGame Game = TheGame; IPlayer Player = Game.gameStateManager.world.Mario; buttonCommandDict = new Dictionary <Buttons, ICommand> { { Buttons.Start, new PressQToQuitCommand(Game) }, { Buttons.Back, new PressRToResetCommand(Game) }, { Buttons.A, new MarioTurnSmallCommand(Player) }, { Buttons.B, new MarioTurnBigCommand(Player) }, { Buttons.X, new MarioTurnFireCommand(Player) }, { Buttons.Y, new MarioTurnDeadCommand(Player) }, { Buttons.LeftThumbstickUp, new MarioGoUpCommand(TheGame.gameStateManager) }, { Buttons.LeftThumbstickDown, new MarioGoDownCommand(TheGame.gameStateManager) }, { Buttons.LeftThumbstickLeft, new MarioTurnLeftCommand(Player) }, { Buttons.LeftThumbstickRight, new MarioTurnRightCommand(Player) }, }; }
public PressQToQuitCommand(OurMarioGame CurrentGameClass) { this.GameClass = CurrentGameClass; }
public PressRToResetCommand(OurMarioGame CurrentGameClass) { this.GameClass = CurrentGameClass; }
public MouseCommand(OurMarioGame game) { this.game = game; }
public MouseController(OurMarioGame game) { Game = game; }