예제 #1
0
 private void Leaderboards_Paint(object sender, PaintEventArgs e)
 {
     Easy.Draw(e.Graphics);
     Medium.Draw(e.Graphics);
     Hard.Draw(e.Graphics);
     Back.Draw(e.Graphics);
 }
예제 #2
0
        public override void Draw(GameTime gameTime, object param)
        {
            base.Draw(gameTime, param);
            Vector2     length      = Global.gDefaultMediumFont.MeasureString("3");
            SpriteBatch spriteBatch = param as SpriteBatch;

            spriteBatch.DrawString(Global.gDefaultLargeFont, "How to play", new Vector2(102.5f, 77), Color.FromNonPremultiplied(206, 235, 12, 255), 0f, Vector2.Zero, 1f, SpriteEffects.None, 1);
            spriteBatch.DrawString(Global.gDefaultMediumFont, "Cat", new Vector2(123.5f, 177), Color.FromNonPremultiplied(206, 235, 12, 255), 0f, Vector2.Zero, 1f, SpriteEffects.None, 1);
            spriteBatch.DrawString(Global.gDefaultMediumFont, "Left: A", new Vector2(92.5f, 252), Color.FromNonPremultiplied(206, 235, 12, 255), 0f, Vector2.Zero, 1f, SpriteEffects.None, 1);
            spriteBatch.DrawString(Global.gDefaultMediumFont, "Right: D", new Vector2(75.5f, 327), Color.FromNonPremultiplied(206, 235, 12, 255), 0f, Vector2.Zero, 1f, SpriteEffects.None, 1);
            spriteBatch.DrawString(Global.gDefaultMediumFont, "Jump: W", new Vector2(70.5f, 402), Color.FromNonPremultiplied(206, 235, 12, 255), 0f, Vector2.Zero, 1f, SpriteEffects.None, 1);
            spriteBatch.DrawString(Global.gDefaultMediumFont, "Down: S", new Vector2(77, 477), Color.FromNonPremultiplied(206, 235, 12, 255), 0f, Vector2.Zero, 1f, SpriteEffects.None, 1);

            spriteBatch.DrawString(Global.gDefaultMediumFont, "Dog", new Vector2(443.5f, 177), Color.FromNonPremultiplied(206, 235, 12, 255), 0f, Vector2.Zero, 1f, SpriteEffects.None, 1);
            spriteBatch.DrawString(Global.gDefaultMediumFont, "Left: Left", new Vector2(393.5f, 252), Color.FromNonPremultiplied(206, 235, 12, 255), 0f, Vector2.Zero, 1f, SpriteEffects.None, 1);
            spriteBatch.DrawString(Global.gDefaultMediumFont, "Right: Right", new Vector2(357.5f, 327), Color.FromNonPremultiplied(206, 235, 12, 255), 0f, Vector2.Zero, 1f, SpriteEffects.None, 1);
            spriteBatch.DrawString(Global.gDefaultMediumFont, "Jump: Up", new Vector2(382, 402), Color.FromNonPremultiplied(206, 235, 12, 255), 0f, Vector2.Zero, 1f, SpriteEffects.None, 1);
            spriteBatch.DrawString(Global.gDefaultMediumFont, "Down: Down", new Vector2(351.5f, 477), Color.FromNonPremultiplied(206, 235, 12, 255), 0f, Vector2.Zero, 1f, SpriteEffects.None, 1);

            spriteBatch.DrawString(Global.gDefaultLargeFont, "Audio", new Vector2(897, 77), Color.FromNonPremultiplied(206, 235, 12, 255), 0f, Vector2.Zero, 1f, SpriteEffects.None, 1);
            spriteBatch.DrawString(Global.gDefaultMediumFont, "Music", new Vector2(806, 177), Color.FromNonPremultiplied(206, 235, 12, 255), 0f, Vector2.Zero, 1f, SpriteEffects.None, 1);
            spriteBatch.DrawString(Global.gDefaultMediumFont, "Sound", new Vector2(808, 252), Color.FromNonPremultiplied(206, 235, 12, 255), 0f, Vector2.Zero, 1f, SpriteEffects.None, 1);
            musicDown.Draw(gameTime, param);
            spriteBatch.DrawString(Global.gDefaultMediumFont, MusicLevel.ToString(), new Vector2(1057, 177), Color.FromNonPremultiplied(206, 235, 12, 255), 0f, Vector2.Zero, 1f, SpriteEffects.None, 1);
            musicUp.Draw(gameTime, param);
            soundDown.Draw(gameTime, param);
            spriteBatch.DrawString(Global.gDefaultMediumFont, SoundLevel.ToString(), new Vector2(1057, 252), Color.FromNonPremultiplied(206, 235, 12, 255), 0f, Vector2.Zero, 1f, SpriteEffects.None, 1);
            soundUp.Draw(gameTime, param);

            back.Draw(gameTime, param);
        }
예제 #3
0
        public void Draw(SpriteBatch theSpriteBatch, ContentManager theContentManager)
        {
            if (MyMenuState == MenuState.Startup)
            {
                Logo.Draw(theSpriteBatch, theContentManager);
                PlayButton.Draw(theSpriteBatch, theContentManager);
                OptionsButton.Draw(theSpriteBatch, theContentManager);
                HighScoresButton.Draw(theSpriteBatch, theContentManager);
                ExitGameButton.Draw(theSpriteBatch, theContentManager);
            }
            else if (MyMenuState == MenuState.Options1)
            {
                MusicOn.Draw(theSpriteBatch, theContentManager);
                MusicOff.Draw(theSpriteBatch, theContentManager);
                SoundOn.Draw(theSpriteBatch, theContentManager);
                SoundOff.Draw(theSpriteBatch, theContentManager);
                Cheats.Draw(theSpriteBatch, theContentManager);
                Debug.Draw(theSpriteBatch, theContentManager);
                Cave1.Draw(theSpriteBatch, theContentManager);
                Cave2.Draw(theSpriteBatch, theContentManager);
                Cave3.Draw(theSpriteBatch, theContentManager);
                Back.Draw(theSpriteBatch, theContentManager);

                OptionsLabel.Draw(theSpriteBatch, theContentManager);
                MusicLabel.Draw(theSpriteBatch, theContentManager);
                SoundFXLabel.Draw(theSpriteBatch, theContentManager);
                CaveLabel.Draw(theSpriteBatch, theContentManager);
            }
        }
예제 #4
0
 public void DrawTextbox(SpriteBatch sbatch)
 {
     box.DrawC(sbatch, Color.White);
     Save.Draw(sbatch);
     Back.Draw(sbatch);
     Textbox.Draw(sbatch);
     sbatch.DrawString(Font, Name, namePos, Color.Black);
 }
예제 #5
0
        public override void Draw(SpriteBatch spriteBatch)
        {
            base.Draw(spriteBatch);

            Back.Draw(spriteBatch);
            SceneManager.mapScene.ThePlayer.DrawRank(spriteBatch);

            RankInfo.Draw(spriteBatch);
        }
예제 #6
0
        public override void Draw(SpriteBatch spriteBatch)
        {
            base.Draw(spriteBatch);

            Back.Draw(spriteBatch);

            InventoryInfo.Draw(spriteBatch);
            CraftingInfo.Draw(spriteBatch);

            SceneManager.mapScene.ThePlayer.DrawInventory(spriteBatch);
        }
예제 #7
0
        public override void Draw(SpriteBatch spriteBatch)
        {
            base.Draw(spriteBatch);

            Back.Draw(spriteBatch);
            Controls.Draw(spriteBatch);
            TutorialTips.Draw(spriteBatch);

            StarChanceSlider.Draw(spriteBatch);
            SoundVolumeSlider.Draw(spriteBatch);
            MusicVolumeSlider.Draw(spriteBatch);
        }
예제 #8
0
        public override void Draw(SpriteBatch spriteBatch)
        {
            base.Draw(spriteBatch);

            Back.Draw(spriteBatch);

            Info.Draw(spriteBatch);

            spriteBatch.DrawString(TextureManager.SpriteFont20, "Choose a ship", new Vector2(Globals.ScreenSize.X / 2 - TextureManager.SpriteFont20.MeasureString("Choose a ship").X *(1.5f / 2f), 200), new Color(0, 255, 255), 0f, Vector2.Zero, 1.5f, SpriteEffects.None, 0.1f);

            foreach (TextureButton shipButton in ShipButtons)
            {
                shipButton.Draw(spriteBatch);
            }
        }
예제 #9
0
        public void Draw(SpriteBatch theSpriteBatch, ContentManager theContentManager)
        {
            if (MyMenuState == MenuState.Startup)
            {
                Logo.Draw(theSpriteBatch, theContentManager);
                PlayButton.Draw(theSpriteBatch, theContentManager);
                OptionsButton.Draw(theSpriteBatch, theContentManager);
                HighScoresButton.Draw(theSpriteBatch, theContentManager);
                ExitGameButton.Draw(theSpriteBatch, theContentManager);
            }
            else if (MyMenuState == MenuState.Options)
            {
                MusicOn.Draw(theSpriteBatch, theContentManager);
                MusicOff.Draw(theSpriteBatch, theContentManager);
                SoundOn.Draw(theSpriteBatch, theContentManager);
                SoundOff.Draw(theSpriteBatch, theContentManager);
                Cheats.Draw(theSpriteBatch, theContentManager);
                Debug.Draw(theSpriteBatch, theContentManager);
                Mouse.Draw(theSpriteBatch, theContentManager);
                Keyboard.Draw(theSpriteBatch, theContentManager);
                Kinect.Draw(theSpriteBatch, theContentManager);
                Back.Draw(theSpriteBatch, theContentManager);

                OptionsLabel.Draw(theSpriteBatch, theContentManager);
                MusicLabel.Draw(theSpriteBatch, theContentManager);
                SoundFXLabel.Draw(theSpriteBatch, theContentManager);
                ControlsLabel.Draw(theSpriteBatch, theContentManager);
            }
            else if (MyMenuState == MenuState.Pause)
            {
                backdrop.Draw(theSpriteBatch, theContentManager);

                Resume.Draw(theSpriteBatch, theContentManager);
                MainMenu.Draw(theSpriteBatch, theContentManager);
                Quit.Draw(theSpriteBatch, theContentManager);
            }
        }
예제 #10
0
 public new void Draw(SpriteBatch spriteBatch)
 {
     Background.Draw(spriteBatch);
     Back.Draw(spriteBatch);
 }
예제 #11
0
    public void Draw(GameTime gameTime, SpriteBatch spriteBatch)
    {
        if (gameState == GameState.Playing)
        {
            // if the video is supposed to be on (the user hasn't set it to false in the options menu) play the video, otherwise use
            // an alternative background
            if (videoison)
            {
                Texture2D videoframe = videoplayer.GetTexture();
                spriteBatch.Draw(videoframe, display, Color.White);
            }
            else
            {
                spriteBatch.Draw(alternativebackground, Vector2.Zero, Color.White);
            }
            // Draw the main playing grid, the HUD and the current block
            grid.Draw(gameTime, spriteBatch, block);
            // draw the bomb sprite if the block is indeed a bbomb
            if (newblock is BlockBOOM)
            {
                newblock.Draw(gameTime, spriteBatch, bombblock);
            }
            else
            {
                newblock.Draw(gameTime, spriteBatch, block);
            }
            hud.MainDraw(gameTime, spriteBatch, nextblock);
        }
        if (gameState == GameState.GameOver)
        {
            // if the game is over draw the HUD's gameover screen and the back button
            hud.GameOverScreen(gameTime, spriteBatch);
            Back.Draw(gameTime, spriteBatch);
        }
        if (gameState == GameState.Help)
        {
            // draw the help method and the back button
            hud.Help(gameTime, spriteBatch);
            Back.Draw(gameTime, spriteBatch);
        }
        if (gameState == GameState.Options)
        {
            // draw the background for the options menu
            hud.Options(gameTime, spriteBatch);
            // draw a button for the videoison button, which will be green if the video is on and red if it isn' t
            if (videoison)
            {
                Videobutton = new Button(videobuttonON, new Vector2(155, 250));
                Videobutton.Draw(gameTime, spriteBatch);
            }
            else
            {
                Videobutton = new Button(videobuttonOFF, new Vector2(155, 250));
                Videobutton.Draw(gameTime, spriteBatch);
            }
            // same for music, green if on, red if off.
            if (music)
            {
                Musicbutton = new Button(musicbuttonON, new Vector2(155, 130));
                Musicbutton.Draw(gameTime, spriteBatch);
            }
            else
            {
                Musicbutton = new Button(musicbuttonOFF, new Vector2(155, 130));
                Musicbutton.Draw(gameTime, spriteBatch);
            }
            // Draw the back button
            Back.Draw(gameTime, spriteBatch);
        }

        if (gameState == GameState.Menu)
        {
            // Draw the menu and the menu buttons
            hud.MenuScreen(gameTime, spriteBatch);
            Play.Draw(gameTime, spriteBatch);
            Options.Draw(gameTime, spriteBatch);
            Help.Draw(gameTime, spriteBatch);
            Back.Draw(gameTime, spriteBatch);
        }
    }