home *** CD-ROM | disk | FTP | other *** search
- Monstre2 = function()
- {
- super();
- this.vitesse = 10;
- this.vie = 300;
- this.saveCalc = 57.29577951308232;
- };
- Monstre2.prototype = new Ennemi();
- Object.registerClass("Monstre2Clip",Monstre2);
- Monstre2.prototype.onEnterFrame = function()
- {
- super.onEnterFrame();
- this.teta = Math.atan2(this._parent.vesso._y - this._y,this._parent.vesso._x - this._x);
- this._rotation = this.teta * this.saveCalc;
- };
- Monstre2.prototype.tirnormal = function()
- {
- if(_global.temps % 2 == 0 && random(10) == 0)
- {
- i = this.chercheTirLibre();
- if(i == -1)
- {
- return 0;
- }
- this._parent.tirEnnemiClip.attachMovie("TirCourbeClip","tirEnnemi" + i,_global.tirEnnemiDepth + i);
- var clip = this._parent.tirEnnemiClip["tirEnnemi" + i];
- clip._x = this._x;
- clip._y = this._y;
- clip.angle = this.teta;
- clip._rotation = this._rotation + 180;
- }
- };
-