home *** CD-ROM | disk | FTP | other *** search
- function exitPadClass()
- {
- }
- exitPadClass.prototype = new MovieClip();
- exitPadClass.prototype.onLoad = function()
- {
- this.x = this._x;
- this.y = this._y;
- this.startx = this.x;
- this.starty = this.y;
- };
- exitPadClass.prototype.onEnterFrame = function()
- {
- if(_root.state == "paused")
- {
- }
- if(_root.state == "playing")
- {
- this.ty = Math.abs(py - (this.y - 15));
- if(this.ty < 15)
- {
- this.tx = Math.abs(px - this.x);
- if(this.tx < 20)
- {
- px = this.x;
- leftThrust = 0;
- rightThrust = 0;
- playerFuel += 0.15;
- thrusting = 0;
- addThrust = 0;
- if(playerYspeed > 0)
- {
- playerYspeed = 0;
- }
- playerState = "refueling";
- if(playerFuel > 100)
- {
- playerFuel = 100;
- }
- }
- }
- }
- };
- Object.registerClass("exitPad",exitPadClass);
-