CreateTitleScreen
.Method CreateTitleScreen:Int ()
CENTER (1)
, so fantomEngine will automatically draw the text centered around the given position parameters.Local txtTitle:ftObject = eng.CreateText(font1,"Comet Crusher",eng.canvasWidth/2,eng.canvasHeight/2-40,1) txtTitle.SetLayer(layerTitle)
Local txtTitle2:ftObject = eng.CreateText(font1,"*** Press 'P' to play ***",eng.canvasWidth/2,eng.canvasHeight/2+10,1) txtTitle2.SetLayer(layerTitle) Local txtTitle3:ftObject = eng.CreateText(font1,"*** Press 'H' to see the high-score list ***",eng.canvasWidth/2,eng.canvasHeight/2+40,1) txtTitle3.SetLayer(layerTitle)
Return 0 End
Again, this was another method that will set up a part of your game once you call it. This time it will create a simple title screen which is made of the logo, and two instructions for the player.
18.119.142.85