Ejemplo n.º 1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            tileset   = Content.Load <Texture2D>("smallertileset");
            elf       = Content.Load <Texture2D>("elfsprite");
            orc       = Content.Load <Texture2D>("orcsheet");
            human     = Content.Load <Texture2D>("humansheet");
            ally      = Content.Load <Texture2D>("humanally");
            HUD       = Content.Load <Texture2D>("hud");
            hud2      = Content.Load <Texture2D>("hud2");
            mob       = Content.Load <Texture2D>("mobsprite");
            sword     = Content.Load <Texture2D>("shield");
            shield    = Content.Load <Texture2D>("sword");
            hat       = Content.Load <Texture2D>("hat");
            normal    = Content.Load <SpriteFont>("hudfont");
            menu      = Content.Load <SpriteFont>("default");
            titleBG   = Content.Load <Texture2D>("menubg");
            generalBG = Content.Load <Texture2D>("menubackground");
            HUDBG     = Content.Load <Texture2D>("hudbg");
            health    = Content.Load <Texture2D>("health");
            mana      = Content.Load <Texture2D>("health");
            redTile   = Content.Load <Texture2D>("redTile");
            swordIcon = Content.Load <Texture2D>("swordicon");
            healIcon  = Content.Load <Texture2D>("healicon");
            buffIcon  = Content.Load <Texture2D>("bufficon");
            aoeIcon   = Content.Load <Texture2D>("aoeicon");
            spellIcon = Content.Load <Texture2D>("spellicon");

            //Item Code
            closedChestSprite = Content.Load <Texture2D>("closedChest");
            openChestSprite   = Content.Load <Texture2D>("openChest");
            slot1Sprite       = Content.Load <Texture2D>("slot1");
            slot2Sprite       = Content.Load <Texture2D>("slot2");
            slot3Sprite       = Content.Load <Texture2D>("slot3");
            slot4Sprite       = Content.Load <Texture2D>("slot4");
            testItemSprtie    = Content.Load <Texture2D>("testItem");
            //Item Code

            //Building Code
            tentSprite = Content.Load <Texture2D>("tent");
            //Building Code

            //Anni Sprites
            elfAllySprite   = Content.Load <Texture2D>("elfallysheet");
            orcAllySprite   = Content.Load <Texture2D>("orcallysheet");
            humanAllySprite = Content.Load <Texture2D>("humanallysheet");

            spriteBatch = new SpriteBatch(GraphicsDevice);
            startScreen = new startScreen(
                this,
                spriteBatch,
                menu,
                titleBG);
            Components.Add(startScreen);
            startScreen.Hide();

            winScreen = new winScreen(
                this,
                spriteBatch,
                menu,
                titleBG);
            Components.Add(winScreen);
            winScreen.Hide();

            deathScreen = new deathScreen(
                this,
                spriteBatch,
                menu,
                titleBG);
            Components.Add(deathScreen);
            deathScreen.Hide();

            createcharScreen = new characterCreateScreen(this, spriteBatch, normal, generalBG,
                                                         human, elf, orc, sword, shield, hat);
            Components.Add(createcharScreen);
            createcharScreen.Hide();

            //Reader
            reader read;

            read = new reader();

            actionScreen = new campaignScreen(this, spriteBatch, tileset, elf, graphics, normal, generalBG,
                                              HUD, floatHUD, mob, ally, createcharScreen.Player, health, mana, HUDBG,
                                              openChestSprite, closedChestSprite, slot1Sprite, slot2Sprite, slot3Sprite, slot4Sprite, testItemSprtie, redTile, tentSprite, elfAllySprite, orcAllySprite, humanAllySprite, orc, human, hud2, buffIcon, spellIcon, healIcon, aoeIcon, swordIcon,
                                              read.itemFile(false), read.mapFile(false));//change the true based on the descision from the user.
            Components.Add(actionScreen);
            actionScreen.Hide();

            statScreen = new characterScreen(this, spriteBatch, normal, generalBG, actionScreen.PlayerData);
            Components.Add(statScreen);
            statScreen.Hide();

            levelScreen = new LevelUpScreen(this, spriteBatch, normal, generalBG, actionScreen.Player);
            Components.Add(levelScreen);
            levelScreen.Hide();

            activeScreen = startScreen;
            activeScreen.Show();
        }