Created
November 20, 2017 07:08
-
-
Save writingdeveloper/ebadd6d07cd262398ada0f88fb21e6c2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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