Exemplo n.º 1
0
        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) },
            };
        }
Exemplo n.º 2
0
 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) },
            };
        }
Exemplo n.º 4
0
 public PressQToQuitCommand(OurMarioGame CurrentGameClass)
 {
     this.GameClass = CurrentGameClass;
 }
Exemplo n.º 5
0
 public PressRToResetCommand(OurMarioGame CurrentGameClass)
 {
     this.GameClass = CurrentGameClass;
 }
Exemplo n.º 6
0
 public MouseCommand(OurMarioGame game)
 {
     this.game = game;
 }
Exemplo n.º 7
0
 public MouseController(OurMarioGame game)
 {
     Game = game;
 }