Crafty.timer
Handles game ticks
Back to top
Crafty.timer.step
public void Crafty.timer.step()
Advances the game by triggering EnterFrame and calls Crafty.DrawManager.draw to update the stage.
Back to top
Crafty.timer.getFPS
public void Crafty.timer.getFPS()
Returns the target frames per second. This is not an actual frame rate.
Back to top
Crafty.timer.simulateFrames
Advances the game state by a number of frames and draws the resulting stage at the end. Useful for tests and debugging.
public this Crafty.timer.simulateFrames(Number frames)
- frames
- number of frames to simulate

@craftyjs
#crafty@freenode.net
google groups
louis@craftyjs.com
github