Use this piece of JS to repeatedly call update() method every 10ms.
Handy for game loops!
setInterval(update, 10);
http://www.elated.com/articles/javascript-timers-with-settimeout-and-setinterval/
Full breakout game guide with keypress, mouse & animation
No comments:
Post a Comment