Changeset 98 for pycodeshooter/trunk


Ignore:
Timestamp:
01/22/11 21:12:25 (13 years ago)
Author:
atzm
Message:

move bomb colors definition

Location:
pycodeshooter/trunk/shooter
Files:
2 edited

Legend:

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

    r97 r98  
    297297        playerData.speed, 
    298298        playerData.numbombs, 
     299        ["rgba(255,0,0,0.3)", "rgba(0,0,255,0.3)"], 
    299300        [new LinerBarrage(YExtendBullet, 
    300301                          playerData.shotsize, 
     
    381382        Math.log(bossData.agility + 0.1) * 3, 
    382383        0, 
     384        ["rgba(255,0,0,0.3)", "rgba(0,0,255,0.3)"], 
    383385        brrgs 
    384386    ); 
  • pycodeshooter/trunk/shooter/trooper.js

    r97 r98  
    6868 
    6969var Trooper = function(name, actList, size, hitSize, color, hitColor, 
    70                        x, y, w, h, life, speed, numBombs, barrages) { 
    71  
    72     this.bullets  = new Array(); 
    73     this.bomb     = null; 
    74     this.name     = name; 
    75     this.actList  = actList; 
    76     this.size     = size; 
    77     this.hitSize  = hitSize; 
    78     this.color    = color; 
    79     this.hitColor = hitColor; 
    80     this.x        = x; 
    81     this.y        = y; 
    82     this.w        = w; 
    83     this.h        = h; 
    84     this.life     = life; 
    85     this.speed    = speed; 
    86     this.numBombs = numBombs; 
    87     this.barrages = barrages; 
     70                       x, y, w, h, life, speed, numBombs, bombColors, barrages) { 
     71 
     72    this.bullets    = new Array(); 
     73    this.bomb       = null; 
     74    this.name       = name; 
     75    this.actList    = actList; 
     76    this.size       = size; 
     77    this.hitSize    = hitSize; 
     78    this.color      = color; 
     79    this.hitColor   = hitColor; 
     80    this.x          = x; 
     81    this.y          = y; 
     82    this.w          = w; 
     83    this.h          = h; 
     84    this.life       = life; 
     85    this.speed      = speed; 
     86    this.numBombs   = numBombs; 
     87    this.bombColors = bombColors; 
     88    this.barrages   = barrages; 
    8889 
    8990    this.move = function(x, y) { 
     
    206207    this.addBomb = function() { 
    207208        if (!this.bomb && this.numBombs > 0) { 
    208             this.bomb = new Bomb(this.x, this.y, this.w, this.h, this.size * 2, 10, 
    209                                  ["rgba(255,0,0,0.3)", "rgba(0,0,255,0.3)"]); 
     209            this.bomb = new Bomb(this.x, this.y, this.w, this.h, 
     210                                 this.size * 2, 10, this.bombColors); 
    210211            this.numBombs--; 
    211212        } 
Note: See TracChangeset for help on using the changeset viewer.