Ignore:
Timestamp:
01/17/11 20:28:17 (13 years ago)
Author:
atzm
Message:

tiun tiun

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pycodeshooter/trunk/shooter/bullet.js

    r81 r95  
    2424    this.draw = function(ctx) { 
    2525        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); 
    2828        ctx.fill(); 
    2929        ctx.closePath(); 
     
    3131    this.vanished = function(width, height) { 
    3232        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; 
    3339    }; 
    3440}; 
Note: See TracChangeset for help on using the changeset viewer.