Skip to content

Instantly share code, notes, and snippets.

@grifdail
Created February 8, 2013 20:13
Show Gist options
  • Save grifdail/4741620 to your computer and use it in GitHub Desktop.
Save grifdail/4741620 to your computer and use it in GitHub Desktop.
var compteur = 0
function MainLoop() {
Game.update();
Game.draw();
compteur++;
if (compteur>=60) {
compteur = 0
//ton code
}
}
window.setInterval(MainLoop,1000/60)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment