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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.142.144