Changeset 95 for pycodeshooter/trunk/shooter/bullet.js
- Timestamp:
- 01/17/11 20:28:17 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pycodeshooter/trunk/shooter/bullet.js
r81 r95 24 24 this.draw = function(ctx) { 25 25 ctx.beginPath(); 26 ctx.fillStyle = this. color;27 ctx.arc(this.x, this.y, this. size, 0, Math.PI * 2.0, true);26 ctx.fillStyle = this.getColor(); 27 ctx.arc(this.x, this.y, this.getSize(), 0, Math.PI * 2.0, true); 28 28 ctx.fill(); 29 29 ctx.closePath(); … … 31 31 this.vanished = function(width, height) { 32 32 return (width < this.x || height < this.y || this.x < 0 || this.y < 0); 33 }; 34 this.getSize = function() { 35 return this.size; 36 }; 37 this.getColor = function() { 38 return this.color; 33 39 }; 34 40 };
Note: See TracChangeset
for help on using the changeset viewer.