update( dt )
This function should update the state of the game according to the time value dt.
Usage
update( dt )
Arguments
dtThe time since last update in seconds.
Returns
Nothing
Examples
Example 1: Moving stuff
player = { x = 100, y = 100 }
function update(dt)
-- Move the player horizontally by +200px/second.
player.x = player.x + 200 * dt
end