home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Nave / AitchuTheAbduction.swf / scripts / frame_13 / DoAction.as
Encoding:
Text File  |  2005-11-10  |  932 b   |  33 lines

  1. Monstre2 = function()
  2. {
  3.    super();
  4.    this.vitesse = 10;
  5.    this.vie = 300;
  6.    this.saveCalc = 57.29577951308232;
  7. };
  8. Monstre2.prototype = new Ennemi();
  9. Object.registerClass("Monstre2Clip",Monstre2);
  10. Monstre2.prototype.onEnterFrame = function()
  11. {
  12.    super.onEnterFrame();
  13.    this.teta = Math.atan2(this._parent.vesso._y - this._y,this._parent.vesso._x - this._x);
  14.    this._rotation = this.teta * this.saveCalc;
  15. };
  16. Monstre2.prototype.tirnormal = function()
  17. {
  18.    if(_global.temps % 2 == 0 && random(10) == 0)
  19.    {
  20.       i = this.chercheTirLibre();
  21.       if(i == -1)
  22.       {
  23.          return 0;
  24.       }
  25.       this._parent.tirEnnemiClip.attachMovie("TirCourbeClip","tirEnnemi" + i,_global.tirEnnemiDepth + i);
  26.       var clip = this._parent.tirEnnemiClip["tirEnnemi" + i];
  27.       clip._x = this._x;
  28.       clip._y = this._y;
  29.       clip.angle = this.teta;
  30.       clip._rotation = this._rotation + 180;
  31.    }
  32. };
  33.