Advertisement
Guest User

Untitled

a guest
Apr 28th, 2015
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. public void AddToLives(int amount)
  2. {
  3. if ( amount == -1 )
  4. {
  5. ResetCharactersPositions();
  6. pacman.IsPaused = true;
  7. }
  8.  
  9. _lives += amount;
  10.  
  11. if ( _lives == 0 )
  12. {
  13. GameOverText = "You have Died!";
  14. }
  15. }
  16.  
  17. public string GameOverText
  18. {
  19. get { return _gameOverText; }
  20. private set
  21. {
  22. _gameOverText = value;
  23. _gameOver = true;
  24.  
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement