public GamePadController(SuperMarioBros gameClass) { SuperMarioBros superMarioBros = gameClass; IMario mario = superMarioBros.World.Mario; gamePadControllerMap = new Dictionary <Buttons, ICommand> { { Buttons.Start, new QuitCommand(superMarioBros) }, { Buttons.LeftThumbstickUp, new MarioUpCommand(mario) }, { Buttons.LeftThumbstickDown, new MarioCrouchCommand(mario) }, { Buttons.LeftThumbstickLeft, new MarioLeftCommand(mario) }, { Buttons.LeftThumbstickRight, new MarioRightCommand(mario) }, { Buttons.A, new MarioSmallCommand(mario) }, { Buttons.B, new MarioBigCommand(mario) }, { Buttons.X, new MarioFireCommand(mario) }, { Buttons.Y, new MarioDeadCommand(mario) }, // { Buttons.Back, new ResetCommand(superMarioBros)}, }; }
public QuitCommand(SuperMarioBros game) { this.game = game; }
//private WorldStateManager worldStateManager; public ResetCommand(SuperMarioBros superMarioBros) { this.superMarioBros = superMarioBros; }
public CommandPause(SuperMarioBros game) { _game = game; }
public MouseBasedCommand(SuperMarioBros superMarioBros) { this.superMarioBros = superMarioBros; }