コード例 #1
0
 public PreviousEnemyCommand(Sprint2 sprint)
 {
     game       = sprint;
     nonPlayers = new List <INPC>();
     nonPlayers.Add(new Stalfos(520, 222, 16, 16, game.GetEnemySpriteSheet()));
     nonPlayers.Add(new Keese(520, 222, 16, 16, KeeseStateMachine.KeeseColor.Blue, game.GetEnemySpriteSheet()));
     nonPlayers.Add(new Gel(520, 222, 8, 16, GelStateMachine.GelColor.Teal, game.GetEnemySpriteSheet()));
     nonPlayers.Add(new Goriya(520, 222, 16, 16, GoriyaStateMachine.GoriyaColor.Red, game.GetEnemySpriteSheet()));
 }
コード例 #2
0
        public MouseController(Sprint2 game)
        {
            quit        = new QuitCommand(game);
            standStill  = new StationaryStillStateCommand(game);
            walkInPlace = new StationaryAnimatedStateCommand(game);
            hover       = new MovingStillStateCommand(game);
            walkNormal  = new MovingAnimatedStateCommand(game);

            windowWidth  = game.GraphicsDevice.Viewport.Width;
            windowHeight = game.GraphicsDevice.Viewport.Height;
        }
コード例 #3
0
        public KeyboardController(Sprint2 game)
        {
            linkActions   = new Dictionary <Keys, ICommand>();
            otherCommands = new Dictionary <Keys, ICommand>();
            linkActions.Add(Keys.W, new LinkFaceUpCommand(game));
            linkActions.Add(Keys.Up, new LinkFaceUpCommand(game));
            linkActions.Add(Keys.A, new LinkFaceLeftCommand(game));
            linkActions.Add(Keys.Left, new LinkFaceLeftCommand(game));
            linkActions.Add(Keys.D, new LinkFaceRightCommand(game));
            linkActions.Add(Keys.Right, new LinkFaceRightCommand(game));
            linkActions.Add(Keys.S, new LinkFaceDownCommand(game));
            linkActions.Add(Keys.Down, new LinkFaceDownCommand(game));
            linkActions.Add(Keys.N, new LinkAttackCommand(game));
            linkActions.Add(Keys.Z, new LinkAttackCommand(game));
            linkActions.Add(Keys.E, new DamageLinkCommand(game));
            linkActions.Add(Keys.D1, new LinkUseBrownArrowCommand(game));
            linkActions.Add(Keys.NumPad1, new LinkUseBrownArrowCommand(game));
            linkActions.Add(Keys.D2, new LinkUseBlueArrowCommand(game));
            linkActions.Add(Keys.NumPad2, new LinkUseBlueArrowCommand(game));
            linkActions.Add(Keys.D3, new LinkUseBrownBoomerangCommand(game));
            linkActions.Add(Keys.NumPad3, new LinkUseBrownBoomerangCommand(game));
            linkActions.Add(Keys.D4, new LinkUseBlueBoomerangCommand(game));
            linkActions.Add(Keys.NumPad4, new LinkUseBlueBoomerangCommand(game));
            linkActions.Add(Keys.D5, new LinkUseBombCommand(game));
            linkActions.Add(Keys.NumPad5, new LinkUseBombCommand(game));
            linkActions.Add(Keys.D6, new LinkUseCandleCommand(game));
            linkActions.Add(Keys.NumPad6, new LinkUseCandleCommand(game));

            linkIdleCommand = new LinkIdleCommand(game);

            //Commands for block swapping
            otherCommands.Add(Keys.T, new PreviousBlockCommand(game, --blockIndex));
            otherCommands.Add(Keys.Y, new NextBlockCommand(game, ++blockIndex));

            //Commands for link item swaps
            otherCommands.Add(Keys.U, new PreviousItemCommand(game));
            otherCommands.Add(Keys.I, new NextItemCommand(game));
            otherCommands.Add(Keys.O, new PreviousEnemyCommand(game));
            otherCommands.Add(Keys.P, new NextEnemyCommand(game));
            otherCommands.Add(Keys.R, new ResetGameCommand(game));
            otherCommands.Add(Keys.Q, new QuitCommand(game));
        }
コード例 #4
0
 public LinkFaceDownCommand(Sprint2 sprint)
 {
     game = sprint;
 }
コード例 #5
0
 public LinkAttackCommand(Sprint2 sprint)
 {
     game = sprint;
 }
コード例 #6
0
 public PreviousItemCommand(Sprint2 sprint)
 {
     game = sprint;
 }
コード例 #7
0
 public MovingAnimatedStateCommand(Sprint2 sprint)
 {
     game = sprint;
 }
コード例 #8
0
 public LinkFaceUpCommand(Sprint2 sprint)
 {
     game = sprint;
 }
コード例 #9
0
 public LinkUseBrownArrowCommand(Sprint2 sprint)
 {
     game = sprint;
 }
コード例 #10
0
 public PreviousBlockCommand(Sprint2 sprint, int num)
 {
     game     = sprint;
     blockNum = num;
 }
コード例 #11
0
ファイル: Program.cs プロジェクト: MaasRM/Zelda_Project_3902
 static void Main()
 {
     using (var game = new Sprint2())
         game.Run();
 }
コード例 #12
0
 public MovingStillStateCommand(Sprint2 sprint)
 {
     game = sprint;
 }
コード例 #13
0
 public LinkUseBombCommand(Sprint2 sprint)
 {
     game = sprint;
 }
コード例 #14
0
 public ResetGameCommand(Sprint2 sprint)
 {
     game = sprint;
 }
コード例 #15
0
 public StationaryAnimatedStateCommand(Sprint2 sprint)
 {
     game = sprint;
 }
コード例 #16
0
 public NextItemCommand(Sprint2 sprint)
 {
     game = sprint;
 }
コード例 #17
0
 public StationaryStillStateCommand(Sprint2 sprint)
 {
     game = sprint;
 }
コード例 #18
0
 public QuitCommand(Sprint2 sprint)
 {
     game = sprint;
 }
コード例 #19
0
 public DamageLinkCommand(Sprint2 sprint)
 {
     game = sprint;
 }
コード例 #20
0
 public NextBlockCommand(Sprint2 sprint, int num)
 {
     game     = sprint;
     blockNum = num;
 }
コード例 #21
0
 public LinkFaceRightCommand(Sprint2 sprint)
 {
     game = sprint;
 }
コード例 #22
0
 public LinkFaceLeftCommand(Sprint2 sprint)
 {
     game = sprint;
 }
コード例 #23
0
 public LinkUseBlueBoomerangCommand(Sprint2 sprint)
 {
     game = sprint;
 }
コード例 #24
0
 public LinkIdleCommand(Sprint2 sprint)
 {
     game = sprint;
 }