How would I be able to get a game over screen using the pause function?
- by Joachim Velzel
I am having problems with my snake game, when the snake collides with itself it draws a "game over" image in the background, but only while it's colliding with itself. I want it to behave like the pause function, so that as soon as the snake collides with itself it draws an image on the screen and stops the game play. And then how would you be able to restart or to quit the game?
I just have this for the detection at the moment:
if (snakeHeadRectangle.Intersects(snakeBodyRectangleArray[bodyNumber]))
{
spriteBatch.Draw(textureGameOver, gameOverPosition, Color.White);
}
Thanks