public OptionGameState(Game1 game, SoundEffectInstance titleScreenMusic)
 {
     Game                  = game;
     OptionMenu            = new OptionMenu(Game);
     controllerList        = GetControllerList();
     this.titleScreenMusic = titleScreenMusic;
 }
 public PauseGameState(Game1 game, IGameState oldRoomState, SoundEffectInstance dungeonMusic)
 {
     Game = game;
     roomStatePreserved = oldRoomState;
     PauseGameMenu      = new PauseGameMenu(Game);
     controllerList     = GetControllerList();
     DungeonMusic       = dungeonMusic;
 }
 public ItemSelectionGameState(IPlayer player, RoomGameState oldRoomState)
 {
     Game          = player.Game;
     InventoryMenu = new InventoryMenu(player);
     mapMenu       = new MapMenu(player, oldRoomState.RoomMap);
     hud           = oldRoomState.Hud;
     camera        = new ItemSelectionStateCamera(hud, new List <IMenu> {
         InventoryMenu, mapMenu
     });
     roomStatePreserved = oldRoomState;
     InitControllerList();
 }
Exemplo n.º 4
0
        public ButtonSelector(SpriteBatch spriteBatch, IButtonMenu owningMenu, List <IButton> buttonsList, int numColumns)
        {
            this.owningMenu  = owningMenu;
            this.spriteBatch = spriteBatch;

            this.buttonsList = buttonsList;
            this.numColumns  = numColumns;

            selectorSprites = new ISprite[4];
            selectorSprites[topLeftSelector]     = GameStateSpriteFactory.Instance.CreateTopLeftButtonSelectorSprite();
            selectorSprites[topRightSeletor]     = GameStateSpriteFactory.Instance.CreateTopRightButtonSelectorSprite();
            selectorSprites[bottomRightSelector] = GameStateSpriteFactory.Instance.CreateBottomRightButtonSelectorSprite();
            selectorSprites[bottomLeftSelector]  = GameStateSpriteFactory.Instance.CreateBottomLeftButtonSelectorSprite();
        }
        public GameLoseGameState(Game1 game, IGameState oldRoomState)
        {
            Game = game;
            roomStatePreserved = (RoomGameState)oldRoomState;
            spawnableManager   = (SpawnableManager)roomStatePreserved.SpawnableManager;
            link_die           = SoundFactory.Instance.CreateLinkDieSound();
            game_over          = SoundFactory.Instance.CreateGameOverSound();
            gameOverSprite     = GameStateSpriteFactory.Instance.CreateGameOverSprite();
            redOverlaySprite   = GameStateSpriteFactory.Instance.CreateRedOverlaySprite();

            GameLoseMenu = new GameLoseMenu(Game);

            controllerList = GetControllerList(GameLoseMenu.Buttons);
        }
 public ChangeSecondaryToItem(IButtonMenu menu, LinkConstants.ItemType newSecondaryItem)
 {
     this.menu = (InventoryMenu)menu;
     item      = newSecondaryItem;
 }
 public ToggleButtonCommand(IButtonMenu menu, Type buttonType)
 {
     this.menu       = menu;
     this.buttonType = buttonType;
 }
 public MoveSelectorCommand(IButtonMenu menu, Constants.Direction direction)
 {
     this.menu      = menu;
     this.direction = direction;
 }