Advertisement
Guest User

Untitled

a guest
Sep 16th, 2014
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4.  
  5. public class HighScoreManager : MonoBehaviour
  6. {
  7. List<HighScores> _playerHighScores = new List<HighScores>();
  8.  
  9. void Start()
  10. {
  11. DontDestroyOnLoad(gameObject);
  12.  
  13. // Uusi highscore vaikkapa pelin loppuessa
  14. HighScores _newScore = new HighScores();
  15. _newScore._name = "Murgraal";
  16. _newScore._highScore = 9001;
  17.  
  18. // Sitten lisää score listaan
  19. _playerHighScores.Add(_newScore);
  20. }
  21. }
  22.  
  23. [System.Serializable]
  24. public class HighScores
  25. {
  26. public string _name;
  27. public int _highScore;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement