home *** CD-ROM | disk | FTP | other *** search
- function step()
- {
- _X = _X + vx;
- _Y = _Y + vy;
- if(boundaryTimer-- < 0)
- {
- boundaryTimer = 50;
- if(_X < xmin || _X > xmax || _Y < ymin || _Y > ymax)
- {
- this.unloadMovie();
- }
- }
- if(flameDebrisTimer-- < 0)
- {
- flameDebrisTimer = 3;
- var _loc3_ = _parent._parent.addObj("smoke_1",_parent._parent.debris_layer,_parent._parent.getNextDebrisLevel());
- _loc3_._x = _X;
- _loc3_._y = _Y;
- _loc3_._rotation = _rotation;
- _loc3_._xscale = _loc3_._yscale = 50;
- }
- _parent._parent.testHitDragon(this);
- }
- function destroy()
- {
- this.unloadMovie();
- }
- m_type = "fire";
- xmax = _parent._parent.g_width + 50;
- xmin = -50;
- ymin = -50;
- ymax = _parent._parent.g_ground + 50;
- radians = Math.atan(vy / vx);
- if(vx > 0)
- {
- _rotation = radians * 180 / 3.14159;
- }
- else
- {
- _rotation = radians * 180 / 3.14159 + 180;
- }
- if(vx < 0.00001 && vx > -0.00001)
- {
- _rotation = _rotation + 180;
- }
- var flameDebrisTimer = 0;
- boundaryTimer = 50;
-