O'Reilly logo

Monkey Game Development by Michael Hartlef

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action — showing the high score list

  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 the SetText 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 to active and the layerTitle layer to inactive. Then, close the method.
    layerScore.SetActive(True)
    layerTitle.SetActive(False)
    Return 0
    End
    

What just happened?

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required