Skip to content

Instantly share code, notes, and snippets.

@levicole
Created September 19, 2010 03:08
Show Gist options
  • Select an option

  • Save levicole/586321 to your computer and use it in GitHub Desktop.

Select an option

Save levicole/586321 to your computer and use it in GitHub Desktop.
function Bullet() {
this.x = null;
this.y = spaceship.y - 5;
this.speed = 4;
this.length = 8;
this.prototype.draw = function(){
ctx.beginPath();
ctx.moveTo(this.x, this.y);
ctx.lineTo(this.x, this.y + this.length);
ctx.stroke();
this.y -= this.length;
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment