home *** CD-ROM | disk | FTP | other *** search
- if(_root.paused)
- {
- return undefined;
- }
- if(_alpha < 0)
- {
- this.removeMovieClip();
- }
- if(type !== "slow")
- {
- dis = Math.ceil(this._x - _root.car._x) / (random(100) + 2000);
- }
- else
- {
- dis = Math.ceil(this._x - _root.car._x) / 600;
- }
- if(type !== "homing")
- {
- _Y = _Y - speed;
- _X = _X + xspeed;
- xspeed -= dis;
- }
- time++;
- if(time > 120)
- {
- if(_root.boss.dir == "wait")
- {
- _root.boss.changeDir();
- }
- if(_alpha > 0)
- {
- _alpha = _alpha - 8;
- }
- }
- if(this.hitTest(_root.car))
- {
- if(_root.boss.health > 0)
- {
- _root.kill();
- }
- }
- if(_Y < 0)
- {
- this.removeMovieClip();
- }
- if(_root.car.dead)
- {
- time = 125;
- }
- if(type == "homing")
- {
- _Y = _Y - ySpeed;
- _X = _X + xSpeed;
- }
-