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 — loading a high score list

  1. Create a new method called LoadHighScore.
    Method LoadHighScore:Int ()
    
  2. Call LoadState and store the result inside a local String variable called state.
    Local state:String = LoadState()
    
  3. Check if an app state was found and loaded.
    If state Then
    
  4. A call to LoadFromString from the engine's score list will load the high score list.
    eng.scoreList.LoadFromString(state)
    
  5. Close the IF check, and the method.
    Endif
    Return 0
    End
    

What just happened?

To actually show the list, we need to update the text object array that holds the score values. For this, we will create a method in the next section.

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