home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Diversos / PrettyBang.swf / scripts / DefineSprite_93 / frame_74 / DoAction.as
Encoding:
Text File  |  2007-09-27  |  760 b   |  39 lines

  1. if(!gun_delay)
  2. {
  3.    ghost = 1;
  4.    this._alpha = 50;
  5.    _root.star_sfx.start();
  6. }
  7. else if(!(gun_delay % 16))
  8. {
  9.    if(_parent.cur_balls < _parent.max_balls / 2)
  10.    {
  11.       var r = _parent.get_rotation(this,_parent.player) - this._rotation;
  12.       var i = 0;
  13.       while(i < 12)
  14.       {
  15.          _parent.new_ball(this._x,this._y,r + this._rotation + i * 30,_parent.max_speed / 2,2);
  16.          i++;
  17.       }
  18.       _root.shot_sfx.start();
  19.    }
  20. }
  21. if(ghost)
  22. {
  23.    this._rotation += 10;
  24.    if(!(this._rotation % 180))
  25.    {
  26.       ghost = 0;
  27.       this._alpha = 100;
  28.       polarity = 1 - polarity;
  29.       _parent.boss_helper.text.gotoAndStop(polarity + 1);
  30.    }
  31. }
  32. gun_delay++;
  33. gun_delay %= 256;
  34. if(hp > 0)
  35. {
  36.    prevFrame();
  37.    play();
  38. }
  39.