Asteroids.Classes.HUD.GetScore C# (CSharp) Method

GetScore() public method

public GetScore ( ) : int
return int
        public int GetScore()
        {
            return score;
        }

Usage Example

        public void Update(GameTime gameTime, HUD hud, Highscores scores, ControlHandler contHand)
        {
            MouseState mouse = Mouse.GetState();
            Point mousePoint = new Point(mouse.X, mouse.Y);
            textScore = hud.GetScore().ToString();
            SelectName(mouse, mousePoint, gameTime, contHand, scores);
            //Rectangle mouseRec = new Rectangle((int)mouse.X, (int)mouse.Y, 1,1);
            //if (recRetry.Contains(mousePoint))
            //{
            //    if (mouse.LeftButton == ButtonState.Pressed && mouseReleased == true)
            //    {
            //        gameStateNumber = 2;
            //        mouseReleased = false;
            //    }
            //}
            //if (recMainMenu.Contains(mousePoint))
            //{
            //    if (mouse.LeftButton == ButtonState.Pressed && mouseReleased == true)
            //    {
            //        gameStateNumber = 1;
            //        mouseReleased = false;
            //    }
            //}
            //if (recSubmit.Contains(mousePoint))
            //{
            //    if (mouse.LeftButton == ButtonState.Pressed && mouseReleased == true)
            //    {
            //        scores.AddHighscore(hud.GetScore(), Name);
            //        scores.SaveHighScores();
            //        scores.LoadHighScores();
            //        scores.SortHighScores();

            //        mouseReleased = false;
            //    }
            //}
            //if (mouse.LeftButton == ButtonState.Released)
            //{
            //    mouseReleased = true;
            //}
        }