public PauseMenu(GameStateAgent agent, Point location) { _agent = agent; _location = location.ToVector2(); switch (agent.Player.Inventory.SecondaryItem) { case Secondary.Bow when agent.Player.Inventory.HasArrow && agent.Player.Inventory.HasBow: _selectedItem = Arrow; _cursorPosition = BowPosition; break; case Secondary.Bow: break; case Secondary.Boomerang: _selectedItem = Boomerang; _cursorPosition = BoomerangPosition; break; case Secondary.Bomb: _selectedItem = Bomb; _cursorPosition = BombPosition; break; case Secondary.None: break; default: throw new ArgumentOutOfRangeException(); } }
public GameOverMenu(GameStateAgent agent) { _agent = agent; _selectedItem = ContinueMessage; _location = new Vector2(ContinueMessageLocation.X - 16, ContinueMessageLocation.Y); _cursor = HUDSpriteFactory.Instance.CreateFullHeart(); }
public GameWinMenu(GameStateAgent agent) { _agent = agent; _selectedItem = RetryMessage; _location = new Vector2(RetryMessageLocation.X - 16, RetryMessageLocation.Y); _cursor = HUDSpriteFactory.Instance.CreateFullHeart(); }
public HUDScreen(GameStateAgent agent, Point location) { _agent = agent; _location = location.ToVector2(); _rupeeCount.Location += location; _keyCount.Location += location; _bombCount.Location += location; }
public GameOverMenu(GameStateAgent agent) { _agent = agent; _selectedItem = SubmitScoreMessage; _location = new Vector2(SubmitScoreMessageLocation.X - 16, SubmitScoreMessageLocation.Y); _cursor = HUDSpriteFactory.Instance.CreateFullHeart(); var scoreMessage = "SCORE: " + agent.Score.ToString("D6"); _score.Location = new Point((ScreenWidth - DrawnText.Width(scoreMessage)) / 2, 16); _score.Text = scoreMessage; }
public PanningWorld(GameStateAgent agent) : base(agent) { Updatables = new IUpdatable[] { new QuitResetControllerKeyboard(agent), StateAgent.HUD }; ScaledDrawables = new[] { StateAgent.HUD }; }
public ScoreboardControllerKeyboard(GameStateAgent agent) { var reset = new Reset(agent); _keydownOnceMap = new Dictionary <Keys, ICommand> { { Keys.Q, new Quit(agent) }, { Keys.R, reset }, { Keys.Enter, reset } }; }
public QuitResetControllerKeyboard(GameStateAgent agent) { _keydownMap = new Dictionary <Keys, ICommand> { { Keys.Q, new Quit(agent) } }; _keyupMap = new Dictionary <Keys, ICommand> { { Keys.R, new Reset(agent) } }; }
public GameWinControllerKeyboard(GameStateAgent agent, IMenu winMenu) { var selectUp = new MenuSelectUp(winMenu); var selectDown = new MenuSelectDown(winMenu); var selectChoice = new MenuSelectChoice(winMenu); _keydownOnceMap = new Dictionary <Keys, ICommand> { { Keys.R, new Reset(agent) }, { Keys.Q, new Quit(agent) }, { Keys.Enter, selectChoice }, { Keys.Down, selectDown }, { Keys.S, selectDown }, { Keys.Up, selectUp }, { Keys.W, selectUp } }; }
public ControllerKeyboard(GameStateAgent agent) { var up = new LinkMoveUp(agent.Player); var down = new LinkMoveDown(agent.Player); var right = new LinkMoveRight(agent.Player); var left = new LinkMoveLeft(agent.Player); _keydownMap = new Dictionary <Keys, ICommand> { { Keys.Q, new Quit(agent) } }; _keyupMap = new Dictionary <Keys, ICommand> { { Keys.Z, new LinkPrimaryAction(agent.Player) }, { Keys.D2, new UpgradeSword(agent.Player, Primary.WhiteSword) }, { Keys.D3, new UpgradeSword(agent.Player, Primary.MagicalSword) }, { Keys.X, new LinkSecondaryAction(agent.Player) }, { Keys.D4, new LinkBowAssign(agent.Player) }, { Keys.D5, new LinkBoomerangAssign(agent.Player) }, { Keys.D6, new LinkBombAssign(agent.Player) }, { Keys.D7, new LinkSecondaryAddDebug(agent.Player, Secondary.Coins) }, { Keys.D8, new LinkSecondaryAddDebug(agent.Player, Secondary.ATWBoomerang) }, { Keys.D9, new LinkSecondaryAddDebug(agent.Player, Secondary.BombLauncher) }, { Keys.D0, new LinkSecondaryAddDebug(agent.Player, Secondary.FireBow) }, { Keys.Space, new Commands.Pause(agent) }, { Keys.R, new Reset(agent) } }; _playerDirections = new Dictionary <Keys, ICommand> { { Keys.W, up }, { Keys.A, left }, { Keys.S, down }, { Keys.D, right }, { Keys.Up, up }, { Keys.Left, left }, { Keys.Right, right }, { Keys.Down, down } }; }
public JumpMapControllerMouse(GameStateAgent gameStateAgent) { _gameStateAgent = gameStateAgent; _roommap = new List <Rectangle> { //Row zero rooms new Rectangle(85, 47, 85, 59), new Rectangle(170, 47, 85, 59), //Row one rooms new Rectangle(85, 106, 85, 59), new Rectangle(170, 106, 85, 59), new Rectangle(340, 106, 85, 59), new Rectangle(425, 106, 85, 59), //Row two rooms new Rectangle(0, 165, 85, 59), new Rectangle(85, 165, 85, 59), new Rectangle(170, 165, 85, 59), new Rectangle(255, 165, 85, 59), new Rectangle(340, 165, 85, 59), //Row three rooms new Rectangle(85, 224, 85, 59), new Rectangle(170, 224, 85, 59), new Rectangle(255, 224, 85, 59), new Rectangle(425, 224, 85, 59), //Row four rooms new Rectangle(0, 283, 85, 59), new Rectangle(170, 283, 85, 59), new Rectangle(425, 283, 85, 59), //Row five rooms new Rectangle(85, 342, 85, 59), new Rectangle(170, 342, 85, 59), new Rectangle(255, 342, 85, 59), new Rectangle(425, 342, 85, 59) }; }
public ControllerPauseKeyboard(GameStateAgent agent, IMenu pauseMenu) { var selectUp = new MenuSelectUp(pauseMenu); var selectDown = new MenuSelectDown(pauseMenu); var selectRight = new MenuSelectRight(pauseMenu); var selectLeft = new MenuSelectLeft(pauseMenu); _pauseDirections = new Dictionary <Keys, ICommand> { { Keys.W, selectUp }, { Keys.A, selectLeft }, { Keys.S, selectDown }, { Keys.D, selectRight }, { Keys.Up, selectUp }, { Keys.Left, selectLeft }, { Keys.Down, selectDown }, { Keys.Right, selectRight }, { Keys.Space, new Resume(agent) }, { Keys.R, new Reset(agent) }, { Keys.Q, new Quit(agent) } }; }
public Quit(GameStateAgent agent) { _agent = agent; }
public ShowJumpMap(GameStateAgent agent) { _agent = agent; }
public Reset(GameStateAgent agent) { _agent = agent; }
public Play(GameStateAgent agent) { _agent = agent; }
protected GameWorld(GameStateAgent agent) { StateAgent = agent; }
public Resume(GameStateAgent agent) { _agent = agent; }
public PauseMenu(GameStateAgent agent, Point location) { _agent = agent; _location = location.ToVector2(); switch (agent.Player.Inventory.SecondaryItem) { case Secondary.Boomerang: _selectedItem = Boomerang; _cursorPosition = BoomerangPosition; break; case Secondary.Bomb: _selectedItem = Bomb; _cursorPosition = BombPosition; break; case Secondary.Bow when agent.Player.Inventory.ArrowLevel != Secondary.None: case Secondary.FireBow when agent.Player.Inventory.ArrowLevel != Secondary.None: _selectedItem = Arrow; _cursorPosition = BowPosition; break; case Secondary.Coins: _selectedItem = AlchemyCoin; _cursorPosition = CoinPosition; break; case Secondary.ATWBoomerang: _selectedItem = ATWBoomerang; _cursorPosition = ATWBoomerangPosition; break; case Secondary.BombLauncher: _selectedItem = BombLauncher; _cursorPosition = BombLauncherPosition; break; case Secondary.ExtraSlot1: _selectedItem = GetExtraItemSprite(_agent.Player.Inventory.ExtraItem1); _cursorPosition = Slot7Position; break; case Secondary.ExtraSlot2: _selectedItem = GetExtraItemSprite(_agent.Player.Inventory.ExtraItem2); _cursorPosition = Slot8Position; break; case Secondary.FireBow: case Secondary.Bow: case Secondary.None: case Secondary.Arrow: case Secondary.SilverArrow: case Secondary.LaserBeam: case Secondary.Bait: case Secondary.Clock: case Secondary.Star: break; default: throw new ArgumentOutOfRangeException(_agent.Player.Inventory.SecondaryItem.ToString()); } }
public Pause(GameStateAgent agent) { _agent = agent; }