Skip to content

Instantly share code, notes, and snippets.

@renancaraujo
Last active November 8, 2018 01:08
Show Gist options
  • Save renancaraujo/f0b464630263ca4635434bd09f2324b2 to your computer and use it in GitHub Desktop.
Save renancaraujo/f0b464630263ca4635434bd09f2324b2 to your computer and use it in GitHub Desktop.
Runner.prototype.update = function () {
this.updatePending = false;
var now = getTimeStamp();
var deltaTime = now - (this.time || now);
this.time = now;
if (this.playing) {
this.clearCanvas();
if (this.tRex.jumping) {
this.tRex.updateJump(deltaTime);
}
/* ....... */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment