Skip to content

Instantly share code, notes, and snippets.

@rubentd
Last active August 29, 2015 14:16
Show Gist options
  • Select an option

  • Save rubentd/57656b68504ad2b4c074 to your computer and use it in GitHub Desktop.

Select an option

Save rubentd/57656b68504ad2b4c074 to your computer and use it in GitHub Desktop.
setInterval(function(){
g.mainLoop();
}, INTERVAL);
mainLoop: function(){
if(this.localTank != undefined){
this.sendData(); //send data to server about local tank
}
if(this.localTank != undefined){
//move local tank
this.localTank.move();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment