Skip to content

Instantly share code, notes, and snippets.

@writingdeveloper
Created November 20, 2017 07:08
Show Gist options
  • Save writingdeveloper/ebadd6d07cd262398ada0f88fb21e6c2 to your computer and use it in GitHub Desktop.
Save writingdeveloper/ebadd6d07cd262398ada0f88fb21e6c2 to your computer and use it in GitHub Desktop.
// Definition Player
var Player = function(x, y, speed) {
this.x = x;
this.y = y;
this.speed = speed;
this.sprite = 'images/char-boy.png';
};
Player.prototype.update = function() {}
Player.prototype.render = function() {
ctx.drawImage(Resources.get(this.sprite), this.x, this.y);
displayScoreLevel(score, gameLevel);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment