The OnCreate
method is the only method we can set into stone now. Cool!
UpdateRate
to 60
frames per second.Method OnCreate:Int() SetUpdateRate(60)
cWidth = DeviceWidth() cHeight = DeviceHeight()
SetupGame
. In this method, we will set up the starting values of a new game. Putting this inside a method will enable us to call this part again, once the game is over.SetupGame() Return True End
SetupGame
. Some previously defined variable will be used and set to values appropriate for a new game.Method SetupGame:Int() totalBombsDestroyed = 0 levelNumber = 1 score = 0
Return True End