Time for action – drawing the game structure
In the
Game1.vb
file, replace the currentDraw
method with the following:Protected Overrides Sub Draw(gameTime As GameTime) GraphicsDevice.Clear(Color.Black) spriteBatch.Begin() If gameState = GameStates.TitleScreen Then spriteBatch.Draw(titleScreen, New Rectangle(0, 0, Me.Window.ClientBounds.Width, Me.Window.ClientBounds.Height), Color.White) End If if ((gameState = GameStates.Playing) Or (gameState = GameStates.PlayerDead) Or (gameState = GameStates.GameOver)) Then _starField.Draw(spriteBatch) _asteroidManager.Draw(spriteBatch) _playerManager.Draw(spriteBatch) _enemyManager.Draw(spriteBatch) _explosionManager.Draw(spriteBatch) spriteBatch.DrawString( pericles14, "Score: " + _playerManager.PlayerScore.ToString(), scoreLocation, Color.White) If _playerManager...