Exemple #1
0
        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)},
            };
        }
Exemple #2
0
 public QuitCommand(SuperMarioBros game)
 {
     this.game = game;
 }
Exemple #3
0
        //private WorldStateManager worldStateManager;

        public ResetCommand(SuperMarioBros superMarioBros)
        {
            this.superMarioBros = superMarioBros;
        }
Exemple #4
0
 public CommandPause(SuperMarioBros game)
 {
     _game = game;
 }
Exemple #5
0
 public MouseBasedCommand(SuperMarioBros superMarioBros)
 {
     this.superMarioBros = superMarioBros;
 }