Beispiel #1
0
        public override void Draw(GameTime gameTime)
        {
            SpriteBatch spriteBatch = ScreenManager.SpriteBatch;

            spriteBatch.Begin();

            spriteBatch.Draw(TextureManager.GetTexture2D(ETexture2D.MenuBG), new Rectangle(0, 0, 800, 600), Color.White);
            spriteBatch.Draw(TextureManager.GetTexture2D(ETexture2D.Rect), new Rectangle(10, 70, 780, 450), Color.White);

            spriteBatch.DrawString(TextureManager.GetSpriteFont(ESpriteFont.FontHeading), "HELP", new Vector2(50, 30), Color.White);

            spriteBatch.DrawString(TextureManager.GetSpriteFont(ESpriteFont.FontNormal), "To save your Octopus from the Sun by", new Vector2(30, 130), Color.Azure);
            spriteBatch.Draw(TextureManager.GetTexture2D(ETexture2D.KeyBoard), new Rectangle(480, 110, 162, 90), Color.White);

            spriteBatch.DrawString(TextureManager.GetSpriteFont(ESpriteFont.FontNormal), "The circle with number which your step Octopus can move.", new Vector2(120, 210), Color.White);
            spriteBatch.Draw(TextureManager.GetTexture2D(ETexture2D.HelpStart), new Rectangle(35, 190, 80, 90), Color.White);

            spriteBatch.DrawString(TextureManager.GetSpriteFont(ESpriteFont.FontNormal), "On the way, the rocks are obstacles,\n   Octopus can't go through it", new Vector2(150, 280), Color.White);
            spriteBatch.Draw(TextureManager.GetTexture2D(ETexture2D.HelpRock), new Rectangle(520, 270, 120, 90), Color.White);

            spriteBatch.DrawString(TextureManager.GetSpriteFont(ESpriteFont.FontNormal), "Get Octopus to the pond to win. The opposite, it'll die", new Vector2(120, 390), Color.White);
            spriteBatch.Draw(TextureManager.GetTexture2D(ETexture2D.HelpWin), new Rectangle(30, 370, 80, 90), Color.White);
            spriteBatch.Draw(TextureManager.GetTexture2D(ETexture2D.HelpDied), new Rectangle(680, 370, 80, 90), Color.White);

            spriteBatch.Draw(TextureManager.GetTexture2D(ETexture2D.CSLogo), new Rectangle(10, 530, 83, 60), Color.White);

            btOK.Draw(spriteBatch);

            spriteBatch.End();
        }
        public override void Draw(GameTime gameTime)
        {
            SpriteBatch spriteBatch = ScreenManager.SpriteBatch;

            spriteBatch.Begin();

            spriteBatch.Draw(TextureManager.GetTexture2D(ETexture2D.MenuBG), new Rectangle(-10, 0, 850, 650), Color.White);
            spriteBatch.Draw(TextureManager.GetTexture2D(ETexture2D.Name), new Rectangle(0, 0, 800, 250), Color.White);
            spriteBatch.Draw(TextureManager.GetTexture2D(ETexture2D.Waves), new Rectangle(-10, 300, 850, 350), Color.White);

            spriteBatch.Draw(TextureManager.GetTexture2D(ETexture2D.Tentacle), new Rectangle(250, 180, 600, 164), new Rectangle(0, 0, 600, 164), Color.White, 0,
                             new Vector2(), SpriteEffects.None, 1);
            spriteBatch.Draw(TextureManager.GetTexture2D(ETexture2D.Tentacle), new Rectangle(-100, 240, 600, 164), new Rectangle(0, 0, 600, 164), Color.White, 0,
                             new Vector2(), SpriteEffects.FlipHorizontally, 1);

            spriteBatch.Draw(TextureManager.GetTexture2D(ETexture2D.Rect2), cRectPosition, Color.White);

            spriteBatch.Draw(TextureManager.GetTexture2D(ETexture2D.CSLogo), new Rectangle(10, (600 - 104 - 10), 144, 104), Color.White);

            SongButton.Draw(spriteBatch);
            SoundButton.Draw(spriteBatch);

            btStarting.Draw(spriteBatch);
            btAbout.Draw(spriteBatch);
            btHelping.Draw(spriteBatch);
            btExiting.Draw(spriteBatch);

            spriteBatch.End();

            if (!IsActive)
            {
                ScreenManager.FadeBackBufferToBlack(0.6f);
            }
        }
Beispiel #3
0
        public override void Draw(GameTime gameTime)
        {
            base.Draw(gameTime);

            SpriteBatch spriteBatch = ScreenManager.SpriteBatch;

            spriteBatch.Begin();

            spriteBatch.Draw(TextureManager.GetTexture2D(ETexture2D.MenuBG), new Rectangle(0, 0, 800, 600), Color.White);

            spriteBatch.Draw(TextureManager.GetTexture2D(ETexture2D.Background), cBackground, Color.White);

            spriteBatch.DrawString(TextureManager.GetSpriteFont(ESpriteFont.FontMenu), "Level " + (idLevel + 1).ToString(), new Vector2(340, 80), Color.White);

            for (int i = 0; i < 11; i++)
            {
                for (int j = 0; j < 16; j++)
                {
                    if (Level.listLevels[idLevel][i, j] == 1)
                    {
                        spriteBatch.Draw(TextureManager.GetTexture2D(ETexture2D.Rock),
                                         CoordinateTransfor(i, j), Color.White);
                    }

                    if (Level.listLevels[idLevel][i, j] == 3)
                    {
                        spriteBatch.Draw(TextureManager.GetTexture2D(ETexture2D.Exit),
                                         CoordinateTransfor(i, j), Color.White);
                    }
                }
            }


            beamSearch.Draw(spriteBatch, iRoad);
            astar.Draw(spriteBatch, octopus.CCircle);


            octopus.Draw(spriteBatch);

            spriteBatch.DrawString(TextureManager.GetSpriteFont(ESpriteFont.FontNormal),
                                   astar.Steps.ToString(), octopus.CCircle + new Vector2(20f, 16f),
                                   Color.White, 0.0f,
                                   new Vector2(
                                       TextureManager.GetSpriteFont(ESpriteFont.FontMenu).MeasureString(astar.Steps.ToString()).X / 2,
                                       TextureManager.GetSpriteFont(ESpriteFont.FontMenu).MeasureString(astar.Steps.ToString()).Y / 2),
                                   1f, SpriteEffects.None, 0.0f);



            buttonBeanSearch.Draw(spriteBatch);
            buttonFindRoad.Draw(spriteBatch);
            buttonNextLevel.Draw(spriteBatch);
            buttonBack.Draw(spriteBatch);



            spriteBatch.End();
        }
Beispiel #4
0
        public override void Draw(GameTime gameTime)
        {
            SpriteBatch spriteBatch = ScreenManager.SpriteBatch;

            spriteBatch.Begin();

            spriteBatch.Draw(TextureManager.GetTexture2D(ETexture2D.MenuBG), new Rectangle(0, 0, 800, 600), Color.White);
            //spriteBatch.Draw(TextureManager.GetTexture2D(ETexture2D.Background), new Rectangle(0, 0, 900, 60), new Rectangle(10, 0, 700, 10), Color.White);

            spriteBatch.DrawString(TextureManager.GetSpriteFont(ESpriteFont.FontHeading), "SELECT LEVEL", new Vector2(50, 15), Color.White);


            for (int i = 0; i < 24; i++)
            {
                if (lLevelsStar.Count > i)
                {
                    lLevelButton[i].Draw(spriteBatch);
                }
                else
                {
                    spriteBatch.Draw(TextureManager.GetTexture2D(ETexture2D.LevelButton), lCButtonsPosition[i],
                                     new Rectangle(0, 199 / 4 * 2, 72, 50), new Color(0.7f, 0.7f, 0.7f));

                    spriteBatch.DrawString(TextureManager.GetSpriteFont(ESpriteFont.FontMenu), string.Format("{0}", i + 1),
                                           new Vector2(((lCButtonsPosition[i].Right - TextureManager.GetSpriteFont(ESpriteFont.FontMenu).
                                                         MeasureString(string.Format("{0}", i + 1)).X -
                                                         lCButtonsPosition[i].Left) / 2 + lCButtonsPosition[i].Left),
                                                       (lCButtonsPosition[i].Bottom - TextureManager.GetSpriteFont(ESpriteFont.FontMenu).
                                                        MeasureString(string.Format("{0}", i + 1)).Y -
                                                        lCButtonsPosition[i].Top) / 2 + lCButtonsPosition[i].Top),
                                           new Color(0.7f, 0.7f, 0.7f));
                }

                for (int j = 0; j < 3; j++)
                {
                    if ((lLevelsStar.Count > i) && ((j + 1) <= lLevelsStar[i]))
                    {
                        spriteBatch.Draw(TextureManager.GetTexture2D(ETexture2D.Star),
                                         new Rectangle(lCButtonsPosition[i].X + (j % 3) * 25,
                                                       lCButtonsPosition[i].Y + 55, 20, 20), Color.White);
                    }
                    else
                    {
                        spriteBatch.Draw(TextureManager.GetTexture2D(ETexture2D.Star),
                                         new Rectangle(lCButtonsPosition[i].X + (j % 3) * 25,
                                                       lCButtonsPosition[i].Y + 55, 20, 20), new Color(0.2f, 0.2f, 0.3f)); //Brown
                    }
                }
            }

            btBackToMenu.Draw(spriteBatch);

            spriteBatch.End();
        }
        public override void Draw(GameTime gameTime)
        {
            base.Draw(gameTime);

            SpriteBatch spriteBatch = ScreenManager.SpriteBatch;

            spriteBatch.Begin();

            spriteBatch.Draw(TextureManager.GetTexture2D(ETexture2D.Rect), cRect, Color.White);

            spriteBatch.DrawString(TextureManager.GetSpriteFont(ESpriteFont.FontMenu),
                                   "Are you sure you want to exit?", new Vector2(150, 200), Color.GhostWhite);

            bYes.Draw(spriteBatch);
            bNo.Draw(spriteBatch);

            spriteBatch.End();
        }
Beispiel #6
0
        public override void Draw(GameTime gameTime)
        {
            SpriteBatch spriteBatch = ScreenManager.SpriteBatch;

            spriteBatch.Begin();

            spriteBatch.Draw(TextureManager.GetTexture2D(ETexture2D.MenuBG), new Rectangle(0, 0, 800, 600), Color.White);
            spriteBatch.Draw(TextureManager.GetTexture2D(ETexture2D.Rect), new Rectangle(10, 100, 780, 380), Color.White);

            spriteBatch.DrawString(TextureManager.GetSpriteFont(ESpriteFont.FontHeading), "ABOUT", new Vector2(50, 30), Color.White);

            spriteBatch.DrawString(TextureManager.GetSpriteFont(ESpriteFont.FontNormal), sInformation, new Vector2(30, 120), Color.Azure);

            spriteBatch.Draw(TextureManager.GetTexture2D(ETexture2D.CSLogo), new Rectangle(550, 120, 180, 130), Color.White);

            btOK.Draw(spriteBatch);


            spriteBatch.End();
        }