1. Add a method called
ShowScoreList
.Method ShowScoreList:Int()
2. Load the high score list.
LoadHighScore()
3. Loop through the score list entries, determine their values with
GetValue
, and fill the text object array via theSetText
method.For Local y:Int = 1 To eng.scoreList.Count() txtHighScore[y-1].SetText(eng.scoreList.GetValue(y)) Next
4. To show the high score list, set the
layerScore
layer toactive
and thelayerTitle
layer toinactive
. Then, close the method.layerScore.SetActive(True) layerTitle.SetActive(False) Return 0 End
To load the high score data from storage and set up our list objects, we can now use the ShowScoreList
method. Besides taking care of the loading and storing the values in the list, it will actually show the high score list on the screen.