Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
With all the gameplay elements set in place, it is time to get the application started.
gameActivate() and insert gameIsActive = true. Place the function above the moveChar() function. local gameActivate = function()
gameIsActive = true
end
gameStart().local gameStart = function()
physics.start( true )
physics.setGravity( 0, 9.8 )
charObject using the "touch" for the moveChar() function. drawBackground()
createChar()
eggTimer()
hud()
gameActivate()
Runtime:addEventListener("accelerometer", moveChar)
end