We can set up the high score as follows:
1. Inside the
game
class, create a new method calledCreateHighScoreList
.Method CreateHighScoreList:Int ()
2. The list has a title; guess which one? Create a text object for it that is set to the
layerScore
layer.Local txtTitleHightScore:ftObject = eng.CreateText(font1,"H I G H S C O R E S",eng.canvasWidth/2,70,1) txtTitleHightScore.SetLayer(layerScore)
3. Now, start a FOR loop for 10 entries.
For Local y:Int = 1 To 10
4. Each score entry will have a number on the left, indicating the rank inside the list.
Local txtScoreNum:ftObject = eng.CreateText(font1,"#"+y,eng.canvasWidth/4+50,80 + (eng.canvasHeight/20)*y) txtScoreNum.SetLayer(layerScore)
5. Now, create a new text object for the score values. It is stored inside the
txtHighScore
array, which we have created earlier in the Creating a data structure section.txtHighScore[y-1] = eng.CreateText(font1,"0000000",(eng.canvasWidth/4)*3-50,80 + (eng.canvasHeight...