home *** CD-ROM | disk | FTP | other *** search
- Monstre4 = function()
- {
- super();
- this.vitesse = 10;
- this.vie = 2000;
- };
- Monstre4.prototype = new Ennemi();
- Object.registerClass("Monstre4Clip",Monstre4);
- Monstre4.prototype.onEnterFrame = function()
- {
- super.onEnterFrame();
- this._rotation += 8;
- };
- Monstre4.prototype.tirnormal = function()
- {
- if(random(3) == 0)
- {
- var teta = this._rotation * 2 * 3.141592653589793 / 360;
- var j = 0;
- while(j < 8)
- {
- var i = this.chercheTirLibre();
- if(i == -1)
- {
- return 0;
- }
- this._parent.tirEnnemiClip.attachMovie("TirDirigeClip","tirEnnemi" + i,_global.tirEnnemiDepth + i);
- var clip = this._parent.tirEnnemiClip["tirEnnemi" + i];
- clip._x = this._x + this._width / 2 * Math.cos(teta);
- clip._y = this._y + this._height / 2 * Math.sin(teta);
- clip.angle = Math.atan2(clip._y - this._y,clip._x - this._x);
- clip.vitesse = 15;
- teta += 0.7853981633974483;
- j++;
- }
- }
- };
-