home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Nave / rocket_rush.swf / scripts / __Packages / TargetPosition.as < prev    next >
Encoding:
Text File  |  2007-03-20  |  711 b   |  31 lines

  1. class TargetPosition extends Position
  2. {
  3.    var color;
  4.    var whited_out = false;
  5.    var white = {ra:100,rb:255,ga:100,gb:255,ba:100,bb:255,aa:100,ab:0};
  6.    var normal = {ra:100,rb:0,ga:100,gb:0,ba:100,bb:0,aa:100,ab:0};
  7.    function TargetPosition()
  8.    {
  9.       super();
  10.       this.color = new Color(this);
  11.    }
  12.    function getShot()
  13.    {
  14.       if(!this.whited_out)
  15.       {
  16.          this.color.setTransform(this.white);
  17.          this.whited_out = true;
  18.       }
  19.       else
  20.       {
  21.          this.color.setTransform(this.normal);
  22.          this.whited_out = false;
  23.       }
  24.    }
  25.    function unWhite()
  26.    {
  27.       this.color.setTransform(this.normal);
  28.       this.whited_out = false;
  29.    }
  30. }
  31.