Example #1
0
        public PauseMenuGameState(Game1 game)
        {
            this.game = game;
            menu = new UniversalGUI(game);
            menu.columnOne.Add(new KeyValuePair<ICommands, string>(new IndexMenuCommand(), "Monster Index"));
            menu.columnOne.Add(new KeyValuePair<ICommands, string>(new MonsterMenuCommand(game), "Monsters"));
            menu.columnOne.Add(new KeyValuePair<ICommands, string>(new BagMenuCommand(), "Bag"));
            menu.columnOne.Add(new KeyValuePair<ICommands, string>(new GearMenuCommand(), "Gear"));
            menu.columnOne.Add(new KeyValuePair<ICommands, string>(new CharacterMenuCommand(), "Character"));
            menu.columnOne.Add(new KeyValuePair<ICommands, string>(new SaveMenuCommand(), "Save"));
            menu.columnOne.Add(new KeyValuePair<ICommands, string>(new OptionsMenuCommand(), "Options"));
            menu.columnOne.Add(new KeyValuePair<ICommands, string>(new ExitMenuCommand(game), "Exit"));

            menu.defaultOne.Add(new KeyValuePair<ICommands, string>(new IndexMenuCommand(), "Monster Index"));
            menu.defaultOne.Add(new KeyValuePair<ICommands, string>(new MonsterMenuCommand(game), "Monsters"));
            menu.defaultOne.Add(new KeyValuePair<ICommands, string>(new BagMenuCommand(), "Bag"));
            menu.defaultOne.Add(new KeyValuePair<ICommands, string>(new GearMenuCommand(), "Gear"));
            menu.defaultOne.Add(new KeyValuePair<ICommands, string>(new CharacterMenuCommand(), "Character"));
            menu.defaultOne.Add(new KeyValuePair<ICommands, string>(new SaveMenuCommand(), "Save"));
            menu.defaultOne.Add(new KeyValuePair<ICommands, string>(new OptionsMenuCommand(), "Options"));
            menu.defaultOne.Add(new KeyValuePair<ICommands, string>(new ExitMenuCommand(game), "Exit"));
            menu.currentCommand = menu.columnOne[0].Key;

            menu.Column1StartingPosition.X = game.level.player.position.X + 90;
            menu.Column1StartingPosition.Y = game.level.player.position.Y - 110;
            menu.arrowStartingPosition.X = game.level.player.position.X + 80;
            menu.arrowStartingPosition.Y = game.level.player.position.Y - 110;

            game.keyboard = new MenuController(menu);

            menu.graphicHolder.Add(new KeyValuePair<Texture2D, Rectangle>(Game1.gameContent.Load<Texture2D>("GUI Sprites/menuBorder"), new Rectangle((int)game.level.player.position.X + 70, (int)game.level.player.position.Y - 120, 130, 200)));
        }
        public PauseMenuGameState(Game1 game)
        {
            this.game = game;
            menu      = new UniversalGUI(game);
            menu.columnOne.Add(new KeyValuePair <ICommands, string>(new IndexMenuCommand(), "Monster Index"));
            menu.columnOne.Add(new KeyValuePair <ICommands, string>(new MonsterMenuCommand(game), "Monsters"));
            menu.columnOne.Add(new KeyValuePair <ICommands, string>(new BagMenuCommand(), "Bag"));
            menu.columnOne.Add(new KeyValuePair <ICommands, string>(new GearMenuCommand(), "Gear"));
            menu.columnOne.Add(new KeyValuePair <ICommands, string>(new CharacterMenuCommand(), "Character"));
            menu.columnOne.Add(new KeyValuePair <ICommands, string>(new SaveMenuCommand(), "Save"));
            menu.columnOne.Add(new KeyValuePair <ICommands, string>(new OptionsMenuCommand(), "Options"));
            menu.columnOne.Add(new KeyValuePair <ICommands, string>(new ExitMenuCommand(game), "Exit"));

            menu.defaultOne.Add(new KeyValuePair <ICommands, string>(new IndexMenuCommand(), "Monster Index"));
            menu.defaultOne.Add(new KeyValuePair <ICommands, string>(new MonsterMenuCommand(game), "Monsters"));
            menu.defaultOne.Add(new KeyValuePair <ICommands, string>(new BagMenuCommand(), "Bag"));
            menu.defaultOne.Add(new KeyValuePair <ICommands, string>(new GearMenuCommand(), "Gear"));
            menu.defaultOne.Add(new KeyValuePair <ICommands, string>(new CharacterMenuCommand(), "Character"));
            menu.defaultOne.Add(new KeyValuePair <ICommands, string>(new SaveMenuCommand(), "Save"));
            menu.defaultOne.Add(new KeyValuePair <ICommands, string>(new OptionsMenuCommand(), "Options"));
            menu.defaultOne.Add(new KeyValuePair <ICommands, string>(new ExitMenuCommand(game), "Exit"));
            menu.currentCommand = menu.columnOne[0].Key;

            menu.Column1StartingPosition.X = game.level.player.position.X + 90;
            menu.Column1StartingPosition.Y = game.level.player.position.Y - 110;
            menu.arrowStartingPosition.X   = game.level.player.position.X + 80;
            menu.arrowStartingPosition.Y   = game.level.player.position.Y - 110;

            game.keyboard = new MenuController(menu);

            menu.graphicHolder.Add(new KeyValuePair <Texture2D, Rectangle>(Game1.gameContent.Load <Texture2D>("GUI Sprites/menuBorder"), new Rectangle((int)game.level.player.position.X + 70, (int)game.level.player.position.Y - 120, 130, 200)));
        }
Example #3
0
 public EncounterController(UniversalGUI menu)
 {
     commandLibrary = new Dictionary<Keys, ICommands>();
     commandLibrary.Add(Keys.Up, currentCommand = new EncounterUpCommand(menu));
     commandLibrary.Add(Keys.Down, currentCommand = new EncounterDownCommand(menu));
     commandLibrary.Add(Keys.Left, currentCommand = new EncounterLeftCommand(menu));
     commandLibrary.Add(Keys.Right, currentCommand = new EncounterRightCommand(menu));
     commandLibrary.Add(Keys.Enter, currentCommand = new EncounterSelectCommand(menu));
     commandLibrary.Add(Keys.Escape, currentCommand = new GoBackMenuCommand(menu));
 }
 public EncounterController(UniversalGUI menu)
 {
     commandLibrary = new Dictionary <Keys, ICommands>();
     commandLibrary.Add(Keys.Up, currentCommand     = new EncounterUpCommand(menu));
     commandLibrary.Add(Keys.Down, currentCommand   = new EncounterDownCommand(menu));
     commandLibrary.Add(Keys.Left, currentCommand   = new EncounterLeftCommand(menu));
     commandLibrary.Add(Keys.Right, currentCommand  = new EncounterRightCommand(menu));
     commandLibrary.Add(Keys.Enter, currentCommand  = new EncounterSelectCommand(menu));
     commandLibrary.Add(Keys.Escape, currentCommand = new GoBackMenuCommand(menu));
 }
Example #5
0
        public EncounterGameState(Game1 game)
        {
            font            = Game1.gameContent.Load <SpriteFont>("Fonts/guiFont");
            this.game       = game;
            game.background = Color.White;
            menu            = new UniversalGUI(game);
            menu.columnOne.Add(new KeyValuePair <ICommands, string>(new FightMenuCommand(this, game), "FIGHT"));
            menu.columnOne.Add(new KeyValuePair <ICommands, string>(new MonsterMenuCommand(game), "MONSTERS"));
            menu.columnTwo.Add(new KeyValuePair <ICommands, string>(new BagMenuCommand(), "BAG"));
            menu.columnTwo.Add(new KeyValuePair <ICommands, string>(new RunAwayCommand(game), "RUN"));

            menu.defaultOne.Add(new KeyValuePair <ICommands, string>(new FightMenuCommand(this, game), "FIGHT"));
            menu.defaultOne.Add(new KeyValuePair <ICommands, string>(new MonsterMenuCommand(game), "MONSTERS"));
            menu.defaultTwo.Add(new KeyValuePair <ICommands, string>(new BagMenuCommand(), "BAG"));
            menu.defaultTwo.Add(new KeyValuePair <ICommands, string>(new RunAwayCommand(game), "RUN"));

            menu.currentCommand = menu.columnOne[0].Key;

            menu.Column1StartingPosition = new Vector2(550, 350);
            menu.Column2StartingPosition = new Vector2(650, 350);
            menu.arrowStartingPosition   = new Vector2(540, 350);
            menu.CameraPointer           = new Vector2(530, 270);

            game.keyboard = new EncounterController(menu);

            menu.graphicHolder.Add(new KeyValuePair <Texture2D, Rectangle>(Game1.gameContent.Load <Texture2D>("GUI Sprites/encounterWindow"), new Rectangle(330, 342, 400, 47)));
            menu.graphicHolder.Add(new KeyValuePair <Texture2D, Rectangle>(Game1.gameContent.Load <Texture2D>("GUI Sprites/encounterSelectWindow"), new Rectangle(530, 342, 200, 47)));

            faderTexture = new Texture2D(game.GraphicsDevice, 1, 1);
            var colors = new Color[] { Color.White };

            faderTexture.SetData <Color>(colors);
            faderStart = true;

            dmg      = new Damage();
            enemyMon = game.level.player.monsterBuilder.monsterList["Pikachu"];
            //enemyMon = new Monster("Pikachu", "Electric", 25, 25, 25, 25, 25, 25, "MonsterSprites/jigglypuff");
        }
Example #6
0
        public EncounterGameState(Game1 game)
        {
            font = Game1.gameContent.Load<SpriteFont>("Fonts/guiFont");
            this.game = game;
            game.background = Color.White;
            menu = new UniversalGUI(game);
            menu.columnOne.Add(new KeyValuePair<ICommands, string>(new FightMenuCommand(this, game), "FIGHT"));
            menu.columnOne.Add(new KeyValuePair<ICommands, string>(new MonsterMenuCommand(game), "MONSTERS"));
            menu.columnTwo.Add(new KeyValuePair<ICommands, string>(new BagMenuCommand(), "BAG"));
            menu.columnTwo.Add(new KeyValuePair<ICommands, string>(new RunAwayCommand(game), "RUN"));

            menu.defaultOne.Add(new KeyValuePair<ICommands, string>(new FightMenuCommand(this, game), "FIGHT"));
            menu.defaultOne.Add(new KeyValuePair<ICommands, string>(new MonsterMenuCommand(game), "MONSTERS"));
            menu.defaultTwo.Add(new KeyValuePair<ICommands, string>(new BagMenuCommand(), "BAG"));
            menu.defaultTwo.Add(new KeyValuePair<ICommands, string>(new RunAwayCommand(game), "RUN"));

            menu.currentCommand = menu.columnOne[0].Key;

            menu.Column1StartingPosition = new Vector2(550, 350);
            menu.Column2StartingPosition = new Vector2(650, 350);
            menu.arrowStartingPosition = new Vector2(540, 350);
            menu.CameraPointer = new Vector2(530, 270);

            game.keyboard = new EncounterController(menu);

            menu.graphicHolder.Add(new KeyValuePair<Texture2D, Rectangle>(Game1.gameContent.Load<Texture2D>("GUI Sprites/encounterWindow"), new Rectangle(330, 342, 400, 47)));
            menu.graphicHolder.Add(new KeyValuePair<Texture2D, Rectangle>(Game1.gameContent.Load<Texture2D>("GUI Sprites/encounterSelectWindow"), new Rectangle(530, 342, 200, 47)));

            faderTexture = new Texture2D(game.GraphicsDevice, 1, 1);
            var colors = new Color[] { Color.White };
            faderTexture.SetData<Color>(colors);
            faderStart = true;

            dmg = new Damage();
            enemyMon = game.level.player.monsterBuilder.monsterList["Pikachu"];
            //enemyMon = new Monster("Pikachu", "Electric", 25, 25, 25, 25, 25, 25, "MonsterSprites/jigglypuff");
        }