home *** CD-ROM | disk | FTP | other *** search
- function shieldChargeClass()
- {
- }
- shieldChargeClass.prototype = new MovieClip();
- shieldChargeClass.prototype.onLoad = function()
- {
- this.x = this._x;
- this.y = this._y;
- this.state = "normal";
- };
- shieldChargeClass.prototype.onEnterFrame = function()
- {
- if(_root.state == "paused")
- {
- }
- if(_root.state == "playing")
- {
- if(this.state == "normal")
- {
- if(this.hitTest(_root.player) == true)
- {
- shieldChargeCollected();
- this.state = "start collected";
- }
- }
- if(this.state == "start collected")
- {
- this.counter = 15;
- this.state = "collected wait";
- this.gotoAndPlay(2);
- }
- if(this.state == "collected wait")
- {
- this.counter--;
- if(this.counter < 1)
- {
- removeMovieClip(this);
- }
- }
- }
- };
- Object.registerClass("shieldCharge",shieldChargeClass);
-