public void UpdateValues() { highscoresNumber.text = HighscoreData.ToString(); levelCount.text = LevelCountData.ToString(); foreach (GameObject item in stars) { item.SetActive(false); } for (int i = 0; i < StarsData; i++) { stars[i].SetActive(true); } }
// Start is called before the first frame update void Awake() { if (Instance != null) { Destroy(this); return; } Instance = this; DontDestroyOnLoad(this); data = new HighscoreData(10); LoadHighscores(); Debug.Log(data.ToString()); }
public string HighScoreString() { return(data.ToString()); }