Beispiel #1
0
 public Menu(Sprint5Main game, string[] content)
 {
     Game        = game;
     FirstChoose = true; // mouse stop at first choice first.
     // read keyboard and gamepad state
     OldKeyState = Keyboard.GetState();
     OldPadState = GamePad.GetState(PlayerIndex.One);
     //set up resource manager for eliminating warning
     Content = content;
 }
 public KeyboardController(MarioCharacter mario, Sprint5Main game /*Bricks[] blockList*/)
 {
     // KeyboardController set up
     this.mario = mario;
     /*this.blockList = blockList;*/
     controllerDic     = new Dictionary <Keys, ICommand>();
     controllerDicMove = new Dictionary <Keys, ICommand>();
     Game = game;
     GetCommand();
 }
Beispiel #3
0
 public GamepadController(MarioCharacter mario, Sprint5Main game)
 {
     // GamepadController set up
     Game              = game;
     this.mario        = mario;
     controllerDicMove = new Dictionary <Buttons, ICommand>();
     controllerDic     = new Dictionary <Buttons, ICommand>();
     prevGamePadState  = GamePad.GetState(PlayerIndex.One);
     GetCommand();
 }
Beispiel #4
0
 public QuitCommand(Sprint5Main myGame)
 {
     game = myGame;
 }
Beispiel #5
0
 static void Main()
 {
     using (var game = new Sprint5Main())
         game.Run();
 }