private void ScoresDisplayUpdate() { if (HighScoresNameBox == null) { if (GameObject.Find("txt_HighNames") != null) { GameObject.Find("txt_HighNames").GetComponent <Text>().text = highScoreData.ScoreNames(); } } if (HighScoresScoreBox == null) { if (GameObject.Find("txt_HighScore") != null) { GameObject.Find("txt_HighScore").GetComponent <Text>().text = highScoreData.ScoreScores(); } } if (usesCustomCanvasHighScoreDisplay || createHighScoresDisplayForMe) { if (HighScoresNameBox != null) { HighScoresNameBox.GetComponent <Text>().text = highScoreData.ScoreNames(); } if (HighScoresScoreBox != null) { HighScoresScoreBox.GetComponent <Text>().text = highScoreData.ScoreScores(); } } }
public void DisplayScoresDisplay() { // There is a legacy high scores display, // that uses the gameobject textboxes attached to this script. if (usesCustomCanvasHighScoreDisplay) { //if there is an object called txt_HighNames, put the high scores into it //if not, check the public serialized box, and store the information there if (GameObject.Find("txt_HighNames") != null) { GameObject.Find("txt_HighNames").GetComponent <Text>().text = highScoreData.ScoreNames(); } else if (HighScoresNameBox != null) { HighScoresNameBox.GetComponent <Text>().text = highScoreData.ScoreNames(); } if (GameObject.Find("txt_HighScore") != null) { GameObject.Find("txt_HighScore").GetComponent <Text>().text = highScoreData.ScoreScores(); } else if (HighScoresScoreBox != null) { HighScoresScoreBox.GetComponent <Text>().text = highScoreData.ScoreScores(); } } }