public void Draw(SpriteBatch spriteBatch)
        {
            switch (gameState)
            {
            case GameState.Play:
                spaceship.Draw(spriteBatch);
                target.Draw(spriteBatch);

                foreach (var asteroid in asteroids)
                {
                    asteroid.Draw(spriteBatch);
                }
                foreach (var bullet in bullets)
                {
                    bullet.Draw(spriteBatch);
                }

                score.Draw(spriteBatch);
                health.Draw(spriteBatch);
                //time.Draw(spriteBatch);
                asteroidShooter.Draw(spriteBatch);
                break;

            case GameState.Pause:
                break;

            case GameState.GameOver:
                gameOverCanvas.Draw(spriteBatch);
                break;

            default:
                break;
            }
        }
 public void Draw(SpriteBatch spriteBatch)
 {
     spriteBatch.Draw(background, rectangle, Color.White);
     goToMenu.Draw(spriteBatch);
     playAgain.Draw(spriteBatch);
     text.Draw(spriteBatch);
 }
Exemplo n.º 3
0
 public void Draw(SpriteBatch spriteBatch)
 {
     if (isGameOver)
     {
         spriteBatch.Draw(backgrownd, rectangle, Color.White);
         label.Draw(spriteBatch);
     }
 }
Exemplo n.º 4
0
        public void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(backgroundTexture, new Vector2(0, 0), Color.White);

            menuButton.Draw(spriteBatch);
            text.Draw(spriteBatch);
            specialThanks.Draw(spriteBatch);
        }
Exemplo n.º 5
0
        public void Draw(SpriteBatch spriteBatch)
        {
            if (isMouseOver)
            {
                spriteBatch.Draw(mouseOverTexture, rectangle, Color.White);
            }
            else
            {
                spriteBatch.Draw(defaultTexture, rectangle, Color.White);
            }

            label.Draw(spriteBatch);
        }
Exemplo n.º 6
0
 public void Draw(SpriteBatch spriteBatch)
 {
     spriteBatch.Draw(backgrownd, rectangle, Color.White);
     lineCountText.Draw(spriteBatch);
     title.Draw(spriteBatch);
 }
Exemplo n.º 7
0
 public void Draw(SpriteBatch spriteBatch)
 {
     topScore.Draw(spriteBatch);
     playButton.Draw(spriteBatch);
 }
Exemplo n.º 8
0
 public void Draw(SpriteBatch spriteBatch)
 {
     spriteBatch.Draw(backgrownd, rectangle, Color.White);
     textScore.Draw(spriteBatch);
     textTitle.Draw(spriteBatch);
 }
Exemplo n.º 9
0
 public void Draw(SpriteBatch spriteBatch)
 {
     spriteBatch.Draw(backgrownd, new Rectangle((int)position.X, (int)position.Y, 50, 20), Color.White);
     text.Draw(spriteBatch);
 }