home *** CD-ROM | disk | FTP | other *** search
/ Champak 48 / cdrom_image.iso / Games / antipacman.swf / scripts / DefineSprite_204 / frame_2 / DoAction.as
Encoding:
Text File  |  2007-10-01  |  571 b   |  30 lines

  1. g = 1;
  2. while(g <= TotalGhosts)
  3. {
  4.    if(!this["g" + g].Fall)
  5.    {
  6.       this["g" + g].Delay--;
  7.       if(this["g" + g].Delay == 0)
  8.       {
  9.          this["g" + g].Fall = true;
  10.       }
  11.    }
  12.    if(this["g" + g].Fall)
  13.    {
  14.       if(this["g" + g].Speed == 0)
  15.       {
  16.          this["g" + g].Speed = 3;
  17.       }
  18.       else if(this["g" + g].Speed < 10)
  19.       {
  20.          this["g" + g].Speed *= 1.05;
  21.       }
  22.       this["g" + g]._y += this["g" + g].Speed;
  23.       if(this["g" + g]._y > 450)
  24.       {
  25.          InitGhost(this["g" + g]);
  26.       }
  27.    }
  28.    g++;
  29. }
  30.