Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on May 30th, 2012  |  syntax: JavaScript  |  size: 0.20 KB  |  views: 369  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Player.prototype.update = function() {
  2.     if( keyboard.up() ) {
  3.          this.y -= 1;
  4.     }
  5. };
  6. Player.prototype.draw = function() {
  7.     context.drawImage(this.image, this.x * 16, this.y * 16);
  8. };
clone this paste RAW Paste Data