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 values in the list, it will actually show the high score list on the screen.

Activating the shield of the player ship

At some point in the game, we need to activate the shield of the player ship. One such time is at the start of a new game.

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

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