Пример #1
0
 public InventoryMenu(MainStage game)
 {
     this.game     = game;
     Background    = new GeneralSprite(length, width, frame);
     Selection     = new GeneralSprite(square, square, frame);
     MapSprite     = new GeneralSprite(square, square, frame);
     BombSprite    = new GeneralSprite(square, square, frame);
     BowSprite     = new GeneralSprite(square, square, frame);
     CompassSprite = new GeneralSprite(square, square, frame);
     BoomerSprite  = new GeneralSprite(square, square, frame);
 }
Пример #2
0
 public MouseController(MainStage instance)
 {
     quitGameCommand   = new QuitGameCommand(instance);
     setSpriteCommands = new ICommand[(int)GlobalDefinitions.SpriteModes.Invalid];
     setSpriteCommands[(int)GlobalDefinitions.SpriteModes.StaticFixed] = new SetSpriteCommand(instance,
                                                                                              GlobalDefinitions.SpriteModes.StaticFixed);
     setSpriteCommands[(int)GlobalDefinitions.SpriteModes.StaticVerticalMoving] = new SetSpriteCommand(instance,
                                                                                                       GlobalDefinitions.SpriteModes.StaticVerticalMoving);
     setSpriteCommands[(int)GlobalDefinitions.SpriteModes.AnimatedFixed] = new SetSpriteCommand(instance,
                                                                                                GlobalDefinitions.SpriteModes.AnimatedFixed);
     setSpriteCommands[(int)GlobalDefinitions.SpriteModes.AnimatedHorizontalMoving] = new SetSpriteCommand(instance,
                                                                                                           GlobalDefinitions.SpriteModes.AnimatedHorizontalMoving);
 }
Пример #3
0
 public KeyboardController(MainStage instance)
 {
     controllerMappings = new Dictionary <Keys, ICommand>();
     controllerMappings.Add(Keys.NumPad0, new QuitGameCommand(instance));
     controllerMappings.Add(Keys.D0, new QuitGameCommand(instance));
     controllerMappings.Add(Keys.NumPad1, new SetSpriteCommand(instance, GlobalDefinitions.SpriteModes.StaticFixed));
     controllerMappings.Add(Keys.D1, new SetSpriteCommand(instance, GlobalDefinitions.SpriteModes.StaticFixed));
     controllerMappings.Add(Keys.NumPad2, new SetSpriteCommand(instance, GlobalDefinitions.SpriteModes.AnimatedFixed));
     controllerMappings.Add(Keys.D2, new SetSpriteCommand(instance, GlobalDefinitions.SpriteModes.AnimatedFixed));
     controllerMappings.Add(Keys.NumPad3, new SetSpriteCommand(instance, GlobalDefinitions.SpriteModes.StaticVerticalMoving));
     controllerMappings.Add(Keys.D3, new SetSpriteCommand(instance, GlobalDefinitions.SpriteModes.StaticVerticalMoving));
     controllerMappings.Add(Keys.NumPad4, new SetSpriteCommand(instance, GlobalDefinitions.SpriteModes.AnimatedHorizontalMoving));
     controllerMappings.Add(Keys.D4, new SetSpriteCommand(instance, GlobalDefinitions.SpriteModes.AnimatedHorizontalMoving));
 }
Пример #4
0
        public MenuGamepadController(MainStage instance)
        {
            this.instance      = instance;
            controllerMappings = new Dictionary <Buttons, ICommand>();

            controllerMappings.Add(Buttons.RightTrigger, new ResumeGameCommand(instance));
            controllerMappings.Add(Buttons.Back, new QuitGameCommand(instance));
            controllerMappings.Add(Buttons.LeftTrigger, new ResetGameCommand(instance));
            controllerMappings.Add(Buttons.Start, new PauseGameCommand(instance));

            controllerMappings.Add(Buttons.DPadUp, new SelectUpCommand(this.instance.InventoryMenu));
            controllerMappings.Add(Buttons.DPadLeft, new SelectLeftCommand(this.instance.InventoryMenu));
            controllerMappings.Add(Buttons.DPadDown, new SelectDownCommand(this.instance.InventoryMenu));
            controllerMappings.Add(Buttons.DPadRight, new SelectRightCommand(this.instance.InventoryMenu));
        }
Пример #5
0
        public MenuKeyBroadController(MainStage instance)
        {
            this.instance      = instance;
            controllerMappings = new Dictionary <Keys, ICommand>();

            controllerMappings.Add(Keys.Space, new ResumeGameCommand(instance));
            controllerMappings.Add(Keys.Q, new QuitGameCommand(instance));
            controllerMappings.Add(Keys.R, new ResetGameCommand(instance));
            controllerMappings.Add(Keys.P, new PauseGameCommand(instance));

            controllerMappings.Add(Keys.W, new SelectUpCommand(this.instance.InventoryMenu));
            controllerMappings.Add(Keys.Up, new SelectUpCommand(this.instance.InventoryMenu));
            controllerMappings.Add(Keys.A, new SelectLeftCommand(this.instance.InventoryMenu));
            controllerMappings.Add(Keys.Left, new SelectLeftCommand(this.instance.InventoryMenu));
            controllerMappings.Add(Keys.S, new SelectDownCommand(this.instance.InventoryMenu));
            controllerMappings.Add(Keys.Down, new SelectDownCommand(this.instance.InventoryMenu));
            controllerMappings.Add(Keys.D, new SelectRightCommand(this.instance.InventoryMenu));
            controllerMappings.Add(Keys.Right, new SelectRightCommand(this.instance.InventoryMenu));
        }
Пример #6
0
        public GamepadController(MainStage instance)
        {
            lastButtonPressed = Buttons.Back;
            this.instance     = instance;
            gamepadMappings   = new Dictionary <Buttons, ICommand>();

            gamepadMappings.Add(Buttons.Back, new QuitGameCommand(instance));
            gamepadMappings.Add(Buttons.Start, new PauseGameCommand(instance));
            gamepadMappings.Add(Buttons.LeftTrigger, new ResetGameCommand(instance));
            gamepadMappings.Add(Buttons.DPadUp, new UpMovingCommand(this.instance.Link));
            gamepadMappings.Add(Buttons.DPadLeft, new LeftMovingCommand(this.instance.Link));
            gamepadMappings.Add(Buttons.DPadDown, new DownMovingCommand(this.instance.Link));
            gamepadMappings.Add(Buttons.DPadRight, new RightMovingCommand(this.instance.Link));

            gamepadMappings.Add(Buttons.A, new StandingWoodenSwordCommand(this.instance.Link));
            gamepadMappings.Add(Buttons.X, new UseArrowCommand(this.instance.Link));
            gamepadMappings.Add(Buttons.B, new UseBombCommand(this.instance.Link));
            gamepadMappings.Add(Buttons.Y, new UseBoomerCommand(this.instance.Link));
        }
Пример #7
0
 public ContinueGameCommand(MainStage game)
 {
     this.game = game;
 }
Пример #8
0
 public SetSpriteCommand(MainStage instnace, SpriteModes mode)
 {
     GameInstnace = instnace;
     SpriteMode   = mode;
 }
Пример #9
0
 public ResumeGameCommand(MainStage game)
 {
     this.game = game;
 }
Пример #10
0
 public PauseGameCommand(MainStage game)
 {
     this.game = game;
 }
Пример #11
0
 public DungeonLevel(MainStage game)
 {
     this.game = game;
 }