public void Draw(SpriteBatch spriteBatch)
        {
            if (Properties.Settings.Default.Name == "")
            {
                CommonFunctions.currentTextInputController.Draw(spriteBatch);
            }
            else
            {
                spriteBatch.Draw(background, backgroundRectangle, Color.White);

                spriteBatch.DrawString(font, "Highscore: " + Properties.Settings.Default.Highscore, new Vector2(3 * CommonFunctions.aspectRatioMultiplierX, 3 * CommonFunctions.aspectRatioMultiplierY), Color.White, 0, new Vector2(0, 0), 0.7f * CommonFunctions.aspectRatioMultiplierY, 0, 0);

                if (scoreSubmitted)
                {
                    spriteBatch.DrawString(font, "Highscore submitted! View GLOBAL highscores in the main menu.", new Vector2(3 * CommonFunctions.aspectRatioMultiplierX, 26 * CommonFunctions.aspectRatioMultiplierY), Color.White, 0, new Vector2(0, 0), 0.7f * CommonFunctions.aspectRatioMultiplierY, 0, 0);
                }

                meContr.DrawMenu(spriteBatch);

                if (menuPage == 3)
                {
                    spriteBatch.Draw(background, backgroundRectangle, Color.Gray);
                    spriteBatch.DrawString(font, tutorialText, new Vector2(3 * CommonFunctions.aspectRatioMultiplierX, 3 * CommonFunctions.aspectRatioMultiplierY), Color.White, 0, new Vector2(0, 0), 0.7f * CommonFunctions.aspectRatioMultiplierY, 0, 0);
                }
                else if (menuPage == 6)
                {
                    spriteBatch.Draw(background, backgroundRectangle, Color.Gray);
                    spriteBatch.DrawString(font, highscoreListText, new Vector2(3 * CommonFunctions.aspectRatioMultiplierX, 3 * CommonFunctions.aspectRatioMultiplierY), Color.White, 0, new Vector2(0, 0), 0.7f * CommonFunctions.aspectRatioMultiplierY, 0, 0);
                    spriteBatch.DrawString(font, highscoreListNameText, new Vector2(3 * CommonFunctions.aspectRatioMultiplierX, 60 * CommonFunctions.aspectRatioMultiplierY), Color.White, 0, new Vector2(0, 0), 0.7f * CommonFunctions.aspectRatioMultiplierY, 0, 0);
                    spriteBatch.DrawString(font, highscoreListScoreText, new Vector2(170 * CommonFunctions.aspectRatioMultiplierX, 60 * CommonFunctions.aspectRatioMultiplierY), Color.White, 0, new Vector2(0, 0), 0.7f * CommonFunctions.aspectRatioMultiplierY, 0, 0);
                }
            }
        }
예제 #2
0
        public void Draw(SpriteBatch spriteBatch)
        {
            if (!CommonFunctions.terrainSpawning)
            {
                if (!diedBefore)
                {
                    spriteBatch.DrawString(font, "Raise your score as high as possible!", new Vector2(3 * CommonFunctions.aspectRatioMultiplierX, 3 * CommonFunctions.aspectRatioMultiplierY), Microsoft.Xna.Framework.Color.White, 0, new Vector2(0, 0), 0.7f * CommonFunctions.aspectRatioMultiplierY, 0, 0);
                }
                else
                {
                    if (Convert.ToInt16(previousScore) - 1 >= previousHighscore)
                    {
                        spriteBatch.DrawString(font, "You died! Reached score: " + previousScore + ". New Highscore!", new Vector2(3 * CommonFunctions.aspectRatioMultiplierX, 3 * CommonFunctions.aspectRatioMultiplierY), Microsoft.Xna.Framework.Color.White, 0, new Vector2(0, 0), 0.7f * CommonFunctions.aspectRatioMultiplierY, 0, 0);
                    }
                    else
                    {
                        spriteBatch.DrawString(font, "You died! Reached score: " + previousScore, new Vector2(3 * CommonFunctions.aspectRatioMultiplierX, 3 * CommonFunctions.aspectRatioMultiplierY), Microsoft.Xna.Framework.Color.White, 0, new Vector2(0, 0), 0.7f * CommonFunctions.aspectRatioMultiplierY, 0, 0);
                    }
                }
            }

            spriteBatch.Draw(Skin, destinationRectangle, CommonFunctions.generalColour);

            foreach (Bullet bullet in BulletList)
            {
                bullet.Draw(spriteBatch);
            }

            if (paused)
            {
                meContr.DrawMenu(spriteBatch);
            }
        }