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())); }
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; }
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)); }
public LinkFaceDownCommand(Sprint2 sprint) { game = sprint; }
public LinkAttackCommand(Sprint2 sprint) { game = sprint; }
public PreviousItemCommand(Sprint2 sprint) { game = sprint; }
public MovingAnimatedStateCommand(Sprint2 sprint) { game = sprint; }
public LinkFaceUpCommand(Sprint2 sprint) { game = sprint; }
public LinkUseBrownArrowCommand(Sprint2 sprint) { game = sprint; }
public PreviousBlockCommand(Sprint2 sprint, int num) { game = sprint; blockNum = num; }
static void Main() { using (var game = new Sprint2()) game.Run(); }
public MovingStillStateCommand(Sprint2 sprint) { game = sprint; }
public LinkUseBombCommand(Sprint2 sprint) { game = sprint; }
public ResetGameCommand(Sprint2 sprint) { game = sprint; }
public StationaryAnimatedStateCommand(Sprint2 sprint) { game = sprint; }
public NextItemCommand(Sprint2 sprint) { game = sprint; }
public StationaryStillStateCommand(Sprint2 sprint) { game = sprint; }
public QuitCommand(Sprint2 sprint) { game = sprint; }
public DamageLinkCommand(Sprint2 sprint) { game = sprint; }
public NextBlockCommand(Sprint2 sprint, int num) { game = sprint; blockNum = num; }
public LinkFaceRightCommand(Sprint2 sprint) { game = sprint; }
public LinkFaceLeftCommand(Sprint2 sprint) { game = sprint; }
public LinkUseBlueBoomerangCommand(Sprint2 sprint) { game = sprint; }
public LinkIdleCommand(Sprint2 sprint) { game = sprint; }