Skip to content

Instantly share code, notes, and snippets.

@writingdeveloper
Created November 21, 2017 12:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save writingdeveloper/be408f09eb14754700efc256b6c62b36 to your computer and use it in GitHub Desktop.
Save writingdeveloper/be408f09eb14754700efc256b6c62b36 to your computer and use it in GitHub Desktop.
Enemy_Rock.prototype.update = function(dt) {
this.x += this.speed * dt;
if (this.x >= 505) {
this.x = 0;
}
checkCollision(this);
checkWin(this);
};
Enemy.prototype.update = function(dt) {
this.x += this.speed * dt;
if (this.x >= 505) {
this.x = 0;
}
checkCollision(this);
checkWin(this);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment