public override void Initialize(Game1 game)
        {
            MusicBGPlayer.Start(MenuSongAssestLoader.OptionsSong);
            MusicBGPlayer.Repeat();

            base.bIsInitialized        = true;
            mainOptionsDefaultFont     = game.Content.Load <SpriteFont>(MainMenuFont);
            controlsOptionsDefaultFont = game.Content.Load <SpriteFont>(ControlsMenuFont);
            selectionWindow            = game.Content.Load <Texture2D>(selectionWindowLoc);
            selectionIndicator         = game.Content.Load <Texture2D>(selectionIndicatorLoc);
            sliderBase   = game.Content.Load <Texture2D>(sliderBaseTextureLoc);
            sliderButton = game.Content.Load <Texture2D>(sliderButtonTextureLoc);

            mainOptionButtons.Add(new ScreenButton(null, mainOptionsDefaultFont, "VIDEO", new Vector2(50, 50)));
            mainOptionButtons.Add(new ScreenButton(null, mainOptionsDefaultFont, "SOUND", new Vector2(50, 250)));
            mainOptionButtons.Add(new ScreenButton(null, mainOptionsDefaultFont, "CONTROLS", new Vector2(50, 450)));
            mainOptionButtons.Add(new ScreenButton(null, mainOptionsDefaultFont, "MISC", new Vector2(50, 650)));

            GenerateVideoButtons(game);
            GenerateMusicButtons(game);
            GenerateControlsButtons(game);
            GenerateMiscButtons(game);


            subMenuArray.Add(videoOptionButtons);
            subMenuArray.Add(musicOptionButtons);
            subMenuArray.Add(controlsOptionButtons);
            subMenuArray.Add(miscOptionButtons);
            //subMenuArray[1] = musicOptionButtons;
            //  subMenuArray[2] = controlsOptionButtons;
            //   subMenuArray[3] = miscOptionButtons;
        }
        /*Also contains graphic resources to load.
         *
         *
         */
        public override void Initialize(Game1 game)
        {
            MusicBGPlayer.Start(MenuSongAssestLoader.MMSong);
            MusicBGPlayer.Repeat();

            base.bIsInitialized = true;
            mainMenuDefaultFont = game.Content.Load <SpriteFont>(MainMenuFont);
            testTexture         = game.Content.Load <Texture2D>("Graphics\\MainMenu\\TestRectangle");

            mainMenuTex[0] = game.Content.Load <Texture2D>(MainMenuFGTex);
            mainMenuTex[1] = game.Content.Load <Texture2D>(MainMenuBGTex);
            mainMenuClouds = game.Content.Load <Texture2D>(MainMenuCloudsTex);

            for (int i = 0; i < 3; i++)
            {
                mainMenuBGTexture[i] = game.Content.Load <Texture2D>(MainMenuBG[i]);
            }
            // mainMenuAnimation = new Animation(mainMenuBGTexture);



            mainMenuButtons.Add(new ScreenButton(null, mainMenuDefaultFont, startStoryString, new Vector2(370, 220)));
            mainMenuButtons.Add(new ScreenButton(null, mainMenuDefaultFont, continueStoryString, new Vector2(300, 350)));
            mainMenuButtons.Add(new ScreenButton(null, mainMenuDefaultFont, optionsString, new Vector2(470, 480)));
            mainMenuButtons.Add(new ScreenButton(null, mainMenuDefaultFont, exitGameString, new Vector2(410, 610)));

            clouds.Add(new Shape(mainMenuClouds, 1, cloudsPos1, false, default(Vector2), "Cloud 1"));
            clouds.Add(new Shape(mainMenuClouds, 1, cloudsPos2, false, default(Vector2), "Cloud 2"));
            clouds.Add(new Shape(mainMenuClouds, 1, cloudsPos3, false, default(Vector2), "Cloud 3"));
            clouds.Add(new Shape(mainMenuClouds, 1, cloudsPos4, false, default(Vector2), "Cloud 4"));
            clouds.Add(new Shape(mainMenuClouds, 1, cloudsPos5, false, default(Vector2), "Cloud 5"));
            clouds.Add(new Shape(mainMenuClouds, 1, cloudsPos6, false, default(Vector2), "Cloud 6"));
        }
 public override void Reload()
 {
     MusicBGPlayer.Start(MenuSongAssestLoader.OptionsSong);
     MusicBGPlayer.Repeat();
 }
예제 #4
0
        // Animation spikeBallAnimation;

        public override void Initialize(Game1 game)
        {
            base.Initialize(game);
            MusicBGPlayer.Start(MenuSongAssestLoader.BattleSongOminous);
            MusicBGPlayer.Repeat();
            BasicTeamUtility.Initialize();

            game.IsMouseVisible       = false;
            base.bIsInitialized       = true;
            backGroundTexture         = game.Content.Load <Texture2D>(backGroundString);
            popUpTexture              = game.Content.Load <Texture2D>(popUpString);
            popUpFont                 = game.Content.Load <SpriteFont>(popUpFontString);
            pauseFont                 = game.Content.Load <SpriteFont>(@"Fonts\PauseFont");
            selectionIndicatorTexture = game.Content.Load <Texture2D>(selectionIndicatorString);
            complexSpriteTexture      = game.Content.Load <Texture2D>(complexSpriteString);
            hitBoxHelp                = game.Content.Load <Texture2D>(hitBoxHelpString);
            testTexture               = game.Content.Load <Texture2D>(testTextureString);
            arrowTexture              = game.Content.Load <Texture2D>(arrowString);
            coneTexture               = game.Content.Load <Texture2D>(coneString);

            tempCharTexture = game.Content.Load <Texture2D>(tempCharString);

            //MapBorderINitialization
            for (int i = -1; i < ((SceneUtility.currentMapSize.X / 64) + 2); i++)
            {
                borderTilesBounds.Add(new Rectangle(i * 64, -64, 64, 64));
                borderTilesBounds.Add(new Rectangle(i * 64, (int)SceneUtility.currentMapSize.Y + 64, 64, 64));
            }

            for (int i = 0; i < ((SceneUtility.currentMapSize.Y / 64) + 1); i++)
            {
                borderTilesBounds.Add(new Rectangle(-64, i * 64, 64, 64));
                borderTilesBounds.Add(new Rectangle((int)SceneUtility.currentMapSize.Y + 64, i * 64, 64, 64));
            }


            /*
             * spikeBallTexture = game.Content.Load<Texture2D>(spikeBallString);
             * List<Rectangle> tempList = new List<Rectangle>();
             * tempList.Add((new Rectangle(0, 0, 64, 64)));
             * tempList.Add(new Rectangle(0, 64, 64, 64));
             * List<int> tempListFC = new List<int>() { 16, 16, 0, 0, 0 };
             * //spikeBallAnimation = new Animation(tempList,tempListFC,spikeBallTexture);
             *
             * test = new Shape(spikeBallTexture, 1, new Vector2(500, 500), true, default(Vector2), "Spiked ball", new Rectangle(0, 0, 64, 64));
             * test.InitializeAnimation(tempList, tempListFC, spikeBallTexture, 600 / 16);
             * test.bPlayAnimation = true;
             * test.DynamicHitBoxes();
             * shapes.Add(test);
             *
             * test = new Shape(spikeBallTexture, 1, new Vector2(500, 400), true, default(Vector2), "Spiked ball", new Rectangle(0, 0, 64, 64));
             * test.InitializeAnimation(tempList, tempListFC, spikeBallTexture, 600 / 16);
             * test.bPlayAnimation = true;
             * // test.DynamicHitBoxes();
             * shapes.Add(test);
             *
             * test = new Shape(spikeBallTexture, 1, new Vector2(600, 500), true, default(Vector2), "Spiked ball", new Rectangle(0, 0, 64, 64));
             * test.InitializeAnimation(tempList, tempListFC, spikeBallTexture, 600 / 16);
             * test.bPlayAnimation = true;
             * test.animationIndex = 1;
             * test.DynamicHitBoxes();
             * shapes.Add(test);
             *
             * test = new Shape(spikeBallTexture, 1, new Vector2(600, 400), true, default(Vector2), "Spiked ball", new Rectangle(0, 0, 64, 64));
             * test.InitializeAnimation(tempList, tempListFC, spikeBallTexture, 600 / 16);
             * test.bPlayAnimation = true;
             * test.animationIndex = 1;
             * //test.shapeAnimation.currentAnimation = 1;
             * shapes.Add(test);
             */
            ScreenButton[] popUpButtons = { new ScreenButton(null, popUpFont, "Options", new Vector2(283 + 50, 279 + 50)), new ScreenButton(null, popUpFont, "Exit Game", new Vector2(283 + 550, 279 + 50)) };
            pauseScreen = new WindowPopUp(new Rectangle(0, 0, popUpTexture.Width, popUpTexture.Height), popUpTexture, popUpButtons);

            //^*************************************
            heroes.Add(new BasicHero((CharacterAssetsLoader.heroAssetsC1[(int)CharacterAssetsLoader.heroesC1.hero1]), 1, new Vector2(100, 50), true));
            heroes[heroes.Count - 1].rectangleToDraw = CharacterAssetsLoader.heroAssetsC1[(int)CharacterAssetsLoader.heroesC1.hero1].shapeTextureBounds;
            BasicTeamUtility.parties[(int)BasicTeamUtility.FriendlyParties.Party].Add(heroes[heroes.Count - 1]);
            heroes[heroes.Count - 1].stats.baseStats[(int)BasicStatChart.stats.MaxHealth] = 150;
            heroes[heroes.Count - 1].stats.baseStats[(int)BasicStatChart.stats.Health]    = 150;
            heroes[heroes.Count - 1].stats.baseStats[(int)BasicStatChart.stats.MaxMana]   = 60;
            heroes[heroes.Count - 1].stats.baseStats[(int)BasicStatChart.stats.Mana]      = 60;
            heroes[heroes.Count - 1].stats.baseStats[(int)BasicStatChart.stats.Speed]     = 4;
            heroes[heroes.Count - 1].stats.ResetCurrentStats();
            heroes[heroes.Count - 1].activeSpells = new Spell[9] {
                SpellsAssetLoader.basicMissileArcane, SpellsAssetLoader.basicMissileDark, SpellsAssetLoader.basicMissileEarth,
                SpellsAssetLoader.basicMissileFire, SpellsAssetLoader.basicMissileGrass, SpellsAssetLoader.basicMissileIce,
                default(Spell), default(Spell), default(Spell)
            };
            activeObjects.Clear();
            activeObjects.AddRange(enemies);
            activeObjects.AddRange(heroes);
        }