示例#1
0
        public override void Draw(GameTime gameTime)
        {
            graphicsDevice.Clear(Color.Red);

            Game1.levelManager.prevStatePlayLevel.Draw(gameTime);

            spriteBatch.Begin();

            if (pauseTransparency != null)
            {
                pauseTransparency.Draw(spriteBatch);
            }

            HelperUtils.DrawStringCentered(spriteBatch, new Vector2(Game1.screenSize.X / 2, 75), Resources.FontMainTitle, 1f, pausedTitle, Color.White);

            HelperUtils.DrawStringCentered(spriteBatch, new Vector2(Game1.screenSize.X / 2, 135), Resources.FontMain, .65f, Levels.getLevelName(), Color.White);

            HelperUtils.DrawStringCentered(spriteBatch, new Vector2(Game1.screenSize.X / 2, 550), Resources.FontMain, .65f, "Press Any Keyboard Key to Resume", Color.White);

            buttonContinue.Draw(spriteBatch);
            buttonHowToPlay.Draw(spriteBatch);
            buttonExit.Draw(spriteBatch);

            // Draw Cursor
            Vector2 cursorOffset = new Vector2(Resources.Crosshair.Width, Resources.Crosshair.Height);

            spriteBatch.Draw(Resources.Crosshair, PlayerInput.mousePosition - (cursorOffset / 2), Color.White);
            spriteBatch.End();
        }
示例#2
0
        public void Draw(SpriteBatch spriteBatch)
        {
            // Score
            HelperUtils.DrawStringLeft(spriteBatch, new Vector2(xDisplay, yDisplay), Resources.FontMain, 0.5f, "Score:", ColorGUI);
            HelperUtils.DrawStringLeft(spriteBatch, new Vector2(xDisplay, yDisplay + 25), Resources.FontMain, 0.5f, Resources.score.ToString(), ColorGUI);

            // Required
            HelperUtils.DrawStringRight(spriteBatch, new Vector2(Game1.screenSize.X - xDisplay, yDisplay), Resources.FontMain, 0.5f, "Required:", ColorGUI);
            HelperUtils.DrawStringRight(spriteBatch, new Vector2(Game1.screenSize.X - xDisplay, yDisplay + 25), Resources.FontMain, 0.5f, requiredGoal, ColorGUI);

            // Lives
            HelperUtils.DrawStringCentered(spriteBatch, new Vector2(xMid, yDisplay), Resources.FontMain, 0.5f, "Lives:", ColorGUI);
            if (Game1.spriteManager.player.sprite.hitPoints > 1)
            {
                HelperUtils.DrawStringCentered(spriteBatch, new Vector2(xMid, yDisplay + 25), Resources.FontMain, 0.5f, Game1.spriteManager.player.sprite.hitPoints.ToString(), ColorGUI);
            }
            else
            {
                HelperUtils.DrawStringCentered(spriteBatch, new Vector2(xMid, yDisplay + 35), Resources.FontMain, 1f, Game1.spriteManager.player.sprite.hitPoints.ToString(), Resources.ColorLose);
            }

            // Level
            HelperUtils.DrawStringCentered(spriteBatch, new Vector2(xMid, Game1.screenSize.Y - 45), Resources.FontMain, 0.5f, Levels.getLevelName(), ColorGUI);

            // Cheating
            if (Resources.cheatingFlag)
            {
                HelperUtils.DrawStringCentered(spriteBatch, new Vector2(xMid, yMid), Resources.FontMain, 0.5f, "Cheating Enabled", ColorGUI);
            }

            // Boss info if Applicable
            if (Resources.currPlayLevel == 11 && Game1.spriteManager.boss != null)
            {
                HelperUtils.DrawStringCentered(spriteBatch, new Vector2(xMid, Game1.screenSize.Y - 85), Resources.FontMain, 0.5f,
                                               "Boss Hp" + Game1.spriteManager.boss.health, Resources.ColorLose);
            }
        }