Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. void Count()
  2. {
  3. if(time == 0)
  4. {
  5.  
  6. scoreList.Add(score, name);
  7.  
  8. // PlayerPrefs.SetString(score.ToString(), "saveScore");
  9. //PlayerPrefs.SetString(name, "saveName");
  10. gameOver.text = "GAME OVER! Press 'a' to go back to main menu";
  11. movementSpeed = 0;
  12. jumpForce = 0;
  13. mGameOver = true;
  14. CancelInvoke("Count");
  15. }
  16. else
  17. {
  18. time--;
  19. }
  20.  
  21. }
  22.  
  23. void PrintScoreList()
  24. {
  25. string tmpString = "";
  26. Console.WriteLine(tmpString);
  27.  
  28. scoreList.Sort();
  29.  
  30. foreach (Tuple<int, string> tuple in scoreList)
  31. {
  32. tmpString = tmpString + "\n" + string.Format("{0}:{1}", tuple.Item1, tuple.Item2);
  33. }
  34. scoreText.text = tmpString;
  35. Console.WriteLine(tmpString);
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement