Esempio n. 1
0
        public static IController CreateSimpleKeysController(LegendOfZelda game)
        {
            IDictionary <Keys, ICommand> keyBinds = new Dictionary <Keys, ICommand>();
            ICommand cmd;

            cmd = new ResetCommand(game);
            keyBinds.Add(Keys.R, cmd);

            cmd = new QuitCommand(game);
            keyBinds.Add(Keys.Q, cmd);

            return(new SinglePressKeyboardController(keyBinds));
        }
Esempio n. 2
0
        public static IController CreateMenuKeysController(LegendOfZelda game)
        {
            IDictionary <Keys, ICommand> keyBinds = new Dictionary <Keys, ICommand>();
            ICommand cmd;

            cmd = new QuitCommand(game);
            keyBinds.Add(Keys.Q, cmd);

            cmd = new SelectModeCommand(game, "down");
            keyBinds.Add(Keys.Down, cmd);
            keyBinds.Add(Keys.S, cmd);

            cmd = new SelectModeCommand(game, "up");
            keyBinds.Add(Keys.Up, cmd);
            keyBinds.Add(Keys.W, cmd);

            cmd = new StartGameCommand(game);
            keyBinds.Add(Keys.Enter, cmd);



            return(new SinglePressKeyboardController(keyBinds));
        }
Esempio n. 3
0
        public static IController CreateSinglePressKeysController(LegendOfZelda game)
        {
            IDictionary <Keys, ICommand> keyBinds = new Dictionary <Keys, ICommand>();
            ICommand cmd;

            cmd = new PlayerAttackCommand(game.Link);
            keyBinds.Add(Keys.Z, cmd);
            keyBinds.Add(Keys.N, cmd);

            //item Commands

            cmd = new PlayerUseCurrentItemCommand(game.Link, game.ProjectileManager);
            keyBinds.Add(Keys.D2, cmd);
            keyBinds.Add(Keys.NumPad2, cmd);
            keyBinds.Add(Keys.B, cmd);

            cmd = new ResetCommand(game);
            keyBinds.Add(Keys.R, cmd);

            cmd = new QuitCommand(game);
            keyBinds.Add(Keys.Q, cmd);

            cmd = new PauseGameCommand(game);
            keyBinds.Add(Keys.P, cmd);

            cmd = new InventoryTransitionCommand(game);
            keyBinds.Add(Keys.I, cmd);

            cmd = new ItemShopTransitionCommand(game);
            keyBinds.Add(Keys.E, cmd);

            cmd = new InventoryMoveCommand(game, "left", game.Link);
            keyBinds.Add(Keys.H, cmd);

            cmd = new InventoryMoveCommand(game, "right", game.Link);
            keyBinds.Add(Keys.J, cmd);

            cmd = new AddKeyCommand(game.Link);
            keyBinds.Add(Keys.K, cmd);

            cmd = new AddBombCommand(game.Link);
            keyBinds.Add(Keys.L, cmd);

            cmd = new AddRupeesCommand(game.Link);
            keyBinds.Add(Keys.M, cmd);


            cmd = new SelectItemCommand(game, "down");
            keyBinds.Add(Keys.Down, cmd);


            cmd = new SelectItemCommand(game, "up");
            keyBinds.Add(Keys.Up, cmd);


            cmd = new PurchaseItemCommand(game);
            keyBinds.Add(Keys.Enter, cmd);



            return(new SinglePressKeyboardController(keyBinds));
        }