Skip to content

Instantly share code, notes, and snippets.

@hex13
Last active December 24, 2015 18:49
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 hex13/6845442 to your computer and use it in GitHub Desktop.
Save hex13/6845442 to your computer and use it in GitHub Desktop.
EntityPrototype
var EntityPrototype = {
draw: function(context) {
context.drawImage(this.img, this.x, this.y);
},
move: function() {
this.x += this.vx;
this.y += this.vy;
},
x: 0, y:0, vx:0, vy:0
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment