home *** CD-ROM | disk | FTP | other *** search
- class Ball
- {
- var mc;
- var mcShadow;
- var playField;
- var ballStates;
- var moveShoot;
- var shootInterruption;
- var SHOOTSPEED_LINEAR;
- var SHOOTSPEED_PARABOLIC;
- var SHOOTSPEED_SLOWLYROLL;
- var SHOOTSPEED_SMALLREBOUND;
- var SHOOTPRECISION_LINEAR;
- var SHOOTPRECISION_PARABOLIC;
- var SHOOTSLOWDOWN_LINEAR;
- var slowlyRollTimer;
- var SLOWLYROLL_TIME;
- var MAXSHOOTDIST;
- var fakeParabolAmpl;
- var fakeParabolZoom;
- var trueY_mc;
- var trueX_mcShadow;
- var reboundFactor;
- var reboundTime;
- var frictionTime;
- var initial_scale;
- var isBallInAir;
- var umountStates;
- var umountFramesPerState;
- var shootBallPos;
- var shootMousePos;
- var shootVector;
- function Ball(mc, mcShadow, playField)
- {
- this.mc = mc;
- this.mc.mcBallTrainee._visible = false;
- this.mcShadow = mcShadow;
- this.playField = playField;
- this.ballStates = new Array();
- this.initBallStates(11,2);
- this.defaultState();
- this.moveShoot = "None";
- this.shootInterruption = false;
- this.SHOOTSPEED_LINEAR = 10;
- this.SHOOTSPEED_PARABOLIC = 4;
- this.SHOOTSPEED_SLOWLYROLL = 1.5;
- this.SHOOTSPEED_SMALLREBOUND = 1.5;
- this.SHOOTPRECISION_LINEAR = this.SHOOTSPEED_LINEAR;
- this.SHOOTPRECISION_PARABOLIC = this.SHOOTSPEED_PARABOLIC * 3;
- this.SHOOTSLOWDOWN_LINEAR = 1;
- this.slowlyRollTimer = new TimerSynchronizer();
- this.SLOWLYROLL_TIME = 2000;
- this.MAXSHOOTDIST = this.playField.getMaxX() / 2;
- this.fakeParabolAmpl = this.MAXSHOOTDIST / 4;
- this.fakeParabolZoom = 3;
- this.trueY_mc = this.mc._y;
- this.trueX_mcShadow = this.mcShadow._x;
- this.reboundFactor = 4;
- this.reboundTime = 0;
- this.frictionTime = 0;
- this.initial_scale = 80;
- this.isBallInAir = false;
- }
- function initBallStates(umountStates, umountFramesPerState)
- {
- var _loc2_ = undefined;
- this.ballStates[0] = 1;
- _loc2_ = 1;
- while(_loc2_ <= umountStates)
- {
- this.ballStates[_loc2_] = this.ballStates[_loc2_ - 1] + umountFramesPerState;
- _loc2_ = _loc2_ + 1;
- }
- this.umountStates = umountStates;
- this.umountFramesPerState = umountFramesPerState;
- }
- function getUmountStates()
- {
- return this.umountStates;
- }
- function getUmountFramesPerState()
- {
- return this.umountFramesPerState;
- }
- function defaultState()
- {
- this.mc.mcBall.gotoAndStop(1);
- }
- function setState(state)
- {
- if(state != 1)
- {
- this.mc._xscale = this.initial_scale + 15;
- this.mc._yscale = this.initial_scale + 15;
- }
- this.mc.mcBall.gotoAndStop(state);
- }
- function setRotationDEG(angleDEG)
- {
- this.mc._rotation = angleDEG;
- }
- function setMoveShootLinear()
- {
- this.moveShoot = "Linear";
- }
- function setMoveShootParabolic()
- {
- this.moveShoot = "Parabolic";
- }
- function moveInField(x, y)
- {
- if(x >= this.playField.getMaxX())
- {
- this.interruptMovement();
- }
- if(x <= this.playField.getMinX())
- {
- this.interruptMovement();
- }
- if(y >= this.playField.getMaxY())
- {
- this.interruptMovement();
- }
- if(y <= this.playField.getMinY())
- {
- this.interruptMovement();
- }
- this.mc._x = x;
- this.mc._y = y;
- this.mcShadow._x = x;
- this.mcShadow._y = y;
- }
- function moveInAir(x_mc, y_mc, x_mcShadow, y_mcShadow)
- {
- if(x_mc > this.playField.getMaxX())
- {
- this.interruptMovement();
- }
- if(x_mc < this.playField.getMinX())
- {
- this.interruptMovement();
- }
- if(y_mc > this.playField.getMaxY())
- {
- this.interruptMovement();
- }
- if(y_mc < this.playField.getMinY())
- {
- this.interruptMovement();
- }
- if(x_mcShadow > this.playField.getMaxX())
- {
- this.interruptMovement();
- }
- if(x_mcShadow < this.playField.getMinX())
- {
- this.interruptMovement();
- }
- if(y_mcShadow > this.playField.getMaxY())
- {
- this.interruptMovement();
- }
- if(y_mcShadow < this.playField.getMinY())
- {
- this.interruptMovement();
- }
- this.mc._x = x_mc;
- this.mc._y = y_mc;
- this.mcShadow._x = x_mcShadow;
- this.mcShadow._y = y_mcShadow;
- }
- function getX()
- {
- return this.mc._x;
- }
- function getY()
- {
- return this.mc._y;
- }
- function setShootVector(ballPos, mousePos)
- {
- var _loc2_ = new Vector2D(ballPos,mousePos);
- this.shootBallPos = ballPos;
- this.shootMousePos = mousePos;
- this.shootVector = _loc2_;
- }
- function getShootVector()
- {
- return this.shootVector;
- }
- function getShootMousePos()
- {
- return this.shootMousePos;
- }
- function getShootBallPos()
- {
- return this.shootBallPos;
- }
- function moveLinearShoot()
- {
- if(this.moveShoot != "SlowlyRoll")
- {
- this.moveShoot = "Linear";
- }
- if(this.shootInterruption == true)
- {
- this.moveShoot = "None";
- this.shootInterruption = false;
- return false;
- }
- if(this.mc._x <= this.shootMousePos.getX() + this.SHOOTPRECISION_LINEAR && this.mc._x >= this.shootMousePos.getX() - this.SHOOTPRECISION_LINEAR)
- {
- if(this.mc._y <= this.shootMousePos.getY() + this.SHOOTPRECISION_LINEAR && this.mc._y >= this.shootMousePos.getY() - this.SHOOTPRECISION_LINEAR)
- {
- this.moveShoot = "SlowlyRoll";
- this.slowlyRollTimer.setOldTimer(getTimer());
- }
- }
- if(this.moveShoot == "SlowlyRoll")
- {
- if(this.slowlyRollTimer.getElapsedTimeMs() > this.SLOWLYROLL_TIME)
- {
- this.moveShoot = "None";
- this.trueY_mc = this.mc._y;
- this.trueX_mcShadow = this.mcShadow._x;
- return false;
- }
- }
- var _loc2_ = undefined;
- if(this.moveShoot == "Linear")
- {
- _loc2_ = this.SHOOTSPEED_LINEAR;
- }
- if(this.moveShoot == "SlowlyRoll")
- {
- _loc2_ = this.SHOOTSPEED_SLOWLYROLL;
- this.defaultState();
- }
- if(this.moveShoot == "Linear" || this.moveShoot == "SlowlyRoll")
- {
- var _loc4_ = this.shootVector.getX() / this.shootVector.getNorme() * _loc2_;
- var _loc3_ = this.shootVector.getY() / this.shootVector.getNorme() * _loc2_;
- this.moveInField(this.mc._x + _loc4_,this.mc._y + _loc3_);
- return true;
- }
- }
- function moveLinearShootFriction_Test()
- {
- if(this.moveShoot == "None")
- {
- this.moveShoot = "Linear";
- this.SHOOTSLOWDOWN_LINEAR = 1.1;
- }
- if(this.shootInterruption == true)
- {
- this.moveShoot = "None";
- this.shootInterruption = false;
- return false;
- }
- var _loc2_ = undefined;
- if(this.moveShoot == "Linear")
- {
- _loc2_ = this.SHOOTSPEED_LINEAR;
- this.SHOOTSLOWDOWN_LINEAR -= 0.05;
- }
- if(this.moveShoot == "Linear")
- {
- var _loc4_ = this.shootVector.getX() / this.shootVector.getNorme() * (_loc2_ * this.SHOOTSLOWDOWN_LINEAR);
- var _loc3_ = this.shootVector.getY() / this.shootVector.getNorme() * (_loc2_ * this.SHOOTSLOWDOWN_LINEAR);
- if(_loc4_ < 0.01 && _loc3_ < 0.01)
- {
- this.moveShoot = "None";
- return false;
- }
- this.moveInField(this.mc._x + _loc4_,this.mc._y + _loc3_);
- return true;
- }
- }
- function moveParabolicShoot()
- {
- if(this.moveShoot != "Rebound")
- {
- this.moveShoot = "Parabolic";
- this.reboundTime = 0;
- }
- if(this.shootInterruption == true)
- {
- this.moveShoot = "None";
- this.shootInterruption = false;
- return false;
- }
- if(this.mc._x <= this.shootMousePos.getX() + this.SHOOTPRECISION_PARABOLIC && this.mc._x >= this.shootMousePos.getX() - this.SHOOTPRECISION_PARABOLIC)
- {
- if(this.mc._y <= this.shootMousePos.getY() + this.SHOOTPRECISION_PARABOLIC && this.mc._y >= this.shootMousePos.getY() - this.SHOOTPRECISION_PARABOLIC)
- {
- var _loc14_ = true;
- if(_loc14_ && this.reboundTime != 1)
- {
- this.mc._x = this.shootMousePos.getX();
- this.mc._y = this.shootMousePos.getY();
- }
- this.mcShadow._x = this.mc._x;
- this.mcShadow._y = this.mc._y;
- this.trueY_mc = this.mc._y;
- this.trueX_mcShadow = this.mcShadow._x;
- this.mc._xscale = this.initial_scale;
- this.mc._yscale = this.initial_scale;
- if(this.moveShoot != "Parabolic")
- {
- this.moveShoot = "None";
- return false;
- }
- this.moveShoot = "Rebound";
- }
- }
- if(this.moveShoot == "Rebound" && this.reboundTime == 0)
- {
- var _loc11_ = this.shootVector.getX() / this.reboundFactor;
- var _loc10_ = this.shootVector.getY() / this.reboundFactor;
- this.setShootVector(new Point2D(this.shootMousePos.getX(),this.shootMousePos.getY()),new Point2D(this.shootMousePos.getX() + _loc11_,this.shootMousePos.getY() + _loc10_));
- this.reboundTime = 1;
- }
- var _loc5_ = undefined;
- if(this.moveShoot == "Parabolic")
- {
- _loc5_ = this.SHOOTSPEED_PARABOLIC;
- }
- if(this.moveShoot == "Rebound")
- {
- _loc5_ = this.SHOOTSPEED_SMALLREBOUND;
- }
- if(this.moveShoot == "Parabolic" || this.moveShoot == "Rebound")
- {
- var _loc4_ = this.shootVector.getX() / this.shootVector.getNorme() * _loc5_;
- var _loc8_ = this.shootVector.getY() / this.shootVector.getNorme() * _loc5_;
- var _loc15_ = new Vector2D(new Point2D(this.shootBallPos.getX(),this.shootBallPos.getY()),new Point2D(this.mc._x,this.trueY_mc));
- var _loc12_ = _loc15_.getNorme() / this.shootVector.getNorme();
- var _loc3_ = undefined;
- var _loc6_ = undefined;
- _loc3_ = Math.sin(_loc12_ * 3.141592653589793);
- if(_loc3_ < 0)
- {
- _loc3_ = - _loc3_;
- }
- _loc6_ = _loc3_ * 0.25 * this.shootVector.getNorme();
- this.trueY_mc += _loc8_;
- this.trueX_mcShadow += _loc4_;
- var _loc7_ = undefined;
- var _loc13_ = this.fakeParabolZoom * this.shootVector.getNorme() / this.MAXSHOOTDIST;
- _loc7_ = _loc13_ * _loc3_;
- if(_loc7_ < 1)
- {
- _loc7_ = 1;
- }
- var _loc2_ = this.initial_scale * _loc7_;
- if(_loc2_ <= this.initial_scale)
- {
- _loc2_ = this.initial_scale;
- }
- this.mc._xscale = _loc2_;
- this.mc._yscale = _loc2_;
- this.mcShadow._xscale = _loc2_;
- this.mcShadow._yscale = _loc2_;
- var _loc9_ = "Linear";
- if(_loc9_ == "Linear")
- {
- this.moveInAir(this.mc._x + _loc4_,this.trueY_mc - _loc6_,this.mcShadow._x + _loc4_,this.mcShadow._y + _loc8_);
- }
- if(_loc9_ == "Decal")
- {
- this.moveInAir(this.mc._x + _loc4_,this.trueY_mc - _loc6_,this.trueX_mcShadow + _loc6_,this.mcShadow._y + _loc8_);
- }
- return true;
- }
- }
- function moveTacleFriction()
- {
- if(this.moveShoot != "None")
- {
- this.moveShoot = "";
- this.frictionTime = 0;
- }
- return true;
- }
- function moveLinearShootFriction()
- {
- if(this.moveShoot != "Friction")
- {
- this.moveShoot = "Linear";
- this.frictionTime = 0;
- this.mc.mcBallTrainee._visible = true;
- }
- if(this.shootInterruption == true)
- {
- this.moveShoot = "None";
- this.shootInterruption = false;
- this.mc.mcBallTrainee._visible = false;
- return false;
- }
- if(this.mc._x <= this.shootMousePos.getX() + this.SHOOTPRECISION_LINEAR && this.mc._x >= this.shootMousePos.getX() - this.SHOOTPRECISION_LINEAR)
- {
- if(this.mc._y <= this.shootMousePos.getY() + this.SHOOTPRECISION_LINEAR && this.mc._y >= this.shootMousePos.getY() - this.SHOOTPRECISION_LINEAR)
- {
- var _loc15_ = false;
- if(_loc15_ && this.frictionTime != 1)
- {
- this.mc._x = this.shootMousePos.getX();
- this.mc._y = this.shootMousePos.getY();
- }
- this.mcShadow._x = this.mc._x;
- this.mcShadow._y = this.mc._y;
- this.trueY_mc = this.mc._y;
- this.trueX_mcShadow = this.mcShadow._x;
- this.mc._xscale = this.initial_scale;
- this.mc._yscale = this.initial_scale;
- if(this.moveShoot == "Linear")
- {
- this.moveShoot = "Friction";
- }
- }
- }
- if(this.moveShoot == "Friction" && this.frictionTime == 0)
- {
- var _loc11_ = this.shootVector.getX() / 2;
- var _loc10_ = this.shootVector.getY() / 2;
- this.setShootVector(new Point2D(this.shootMousePos.getX(),this.shootMousePos.getY()),new Point2D(this.shootMousePos.getX() + _loc11_,this.shootMousePos.getY() + _loc10_));
- this.SHOOTSLOWDOWN_LINEAR = 1.1;
- this.frictionTime = 1;
- this.mc.mcBallTrainee._visible = false;
- }
- var _loc5_ = undefined;
- if(this.moveShoot == "Linear")
- {
- _loc5_ = this.SHOOTSPEED_LINEAR;
- }
- if(this.moveShoot == "Friction")
- {
- _loc5_ = this.SHOOTSPEED_SMALLREBOUND;
- }
- if(this.moveShoot == "Friction")
- {
- this.SHOOTSLOWDOWN_LINEAR -= 0.025;
- var _loc4_ = this.shootVector.getX() / this.shootVector.getNorme() * (_loc5_ * this.SHOOTSLOWDOWN_LINEAR);
- var _loc8_ = this.shootVector.getY() / this.shootVector.getNorme() * (_loc5_ * this.SHOOTSLOWDOWN_LINEAR);
- if(_loc4_ < 0.02 && _loc4_ > -0.02 && _loc8_ < 0.02 && _loc8_ > -0.02)
- {
- this.moveShoot = "None";
- trace("Very Slow !!!!! - End Movement.");
- return false;
- }
- this.moveInField(this.mc._x + _loc4_,this.mc._y + _loc8_);
- return true;
- }
- if(this.moveShoot == "Linear")
- {
- var _loc13_ = Math.atan2(this.shootVector.getY(),this.shootVector.getX()) * 180 / 3.141592653589793;
- this.mc.mcBallTrainee._rotation = _loc13_;
- _loc4_ = this.shootVector.getX() / this.shootVector.getNorme() * _loc5_;
- _loc8_ = this.shootVector.getY() / this.shootVector.getNorme() * _loc5_;
- var _loc16_ = new Vector2D(new Point2D(this.shootBallPos.getX(),this.shootBallPos.getY()),new Point2D(this.mc._x,this.trueY_mc));
- var _loc12_ = _loc16_.getNorme() / this.shootVector.getNorme();
- var _loc3_ = undefined;
- var _loc6_ = undefined;
- _loc3_ = Math.sin(_loc12_ * 3.141592653589793);
- if(_loc3_ < 0)
- {
- _loc3_ = - _loc3_;
- }
- _loc6_ = _loc3_ * 0.05 * this.shootVector.getNorme();
- this.trueY_mc += _loc8_;
- this.trueX_mcShadow += _loc4_;
- var _loc7_ = undefined;
- var _loc14_ = 1.3 * this.shootVector.getNorme() / this.MAXSHOOTDIST;
- _loc7_ = _loc14_ * _loc3_;
- if(_loc7_ < 1)
- {
- _loc7_ = 1;
- }
- var _loc2_ = this.initial_scale * _loc7_;
- if(_loc2_ <= this.initial_scale)
- {
- _loc2_ = this.initial_scale;
- }
- this.mc._xscale = _loc2_;
- this.mc._yscale = _loc2_;
- this.mcShadow._xscale = _loc2_;
- this.mcShadow._yscale = _loc2_;
- var _loc9_ = "Decal";
- if(_loc9_ == "Linear")
- {
- this.moveInAir(this.mc._x + _loc4_,this.trueY_mc - _loc6_,this.mcShadow._x + _loc4_,this.mcShadow._y + _loc8_);
- }
- if(_loc9_ == "Decal")
- {
- this.moveInAir(this.mc._x + _loc4_,this.trueY_mc - _loc6_,this.trueX_mcShadow + _loc6_,this.mcShadow._y + _loc8_);
- }
- return true;
- }
- }
- function moveParabolicShootFriction()
- {
- if(this.moveShoot == "None")
- {
- this.moveShoot = "Parabolic";
- this.frictionTime = 0;
- this.reboundTime = 0;
- }
- if(this.shootInterruption == true)
- {
- this.moveShoot = "None";
- this.shootInterruption = false;
- return false;
- }
- if(this.mc._x <= this.shootMousePos.getX() + this.SHOOTPRECISION_PARABOLIC && this.mc._x >= this.shootMousePos.getX() - this.SHOOTPRECISION_PARABOLIC)
- {
- if(this.mc._y <= this.shootMousePos.getY() + this.SHOOTPRECISION_PARABOLIC && this.mc._y >= this.shootMousePos.getY() - this.SHOOTPRECISION_PARABOLIC)
- {
- var _loc14_ = true;
- if(_loc14_ && this.reboundTime != 1)
- {
- this.mc._x = this.shootMousePos.getX();
- this.mc._y = this.shootMousePos.getY();
- }
- this.mcShadow._x = this.mc._x;
- this.mcShadow._y = this.mc._y;
- this.trueY_mc = this.mc._y;
- this.trueX_mcShadow = this.mcShadow._x;
- this.mc._xscale = this.initial_scale;
- this.mc._yscale = this.initial_scale;
- if(this.moveShoot == "Parabolic")
- {
- this.moveShoot = "Rebound";
- }
- else if(this.moveShoot == "Rebound")
- {
- this.moveShoot = "Friction";
- trace("Friction Mode");
- }
- }
- }
- if(this.moveShoot == "Rebound" && this.reboundTime == 0)
- {
- var _loc11_ = this.shootVector.getX() / this.reboundFactor;
- var _loc10_ = this.shootVector.getY() / this.reboundFactor;
- this.setShootVector(new Point2D(this.shootMousePos.getX(),this.shootMousePos.getY()),new Point2D(this.shootMousePos.getX() + _loc11_,this.shootMousePos.getY() + _loc10_));
- this.reboundTime = 1;
- }
- if(this.moveShoot == "Friction" && this.frictionTime == 0)
- {
- _loc11_ = this.shootVector.getX() / 1.5;
- _loc10_ = this.shootVector.getY() / 1.5;
- this.setShootVector(new Point2D(this.shootMousePos.getX(),this.shootMousePos.getY()),new Point2D(this.shootMousePos.getX() + _loc11_,this.shootMousePos.getY() + _loc10_));
- this.SHOOTSLOWDOWN_LINEAR = 1.1;
- this.frictionTime = 1;
- this.shootVector.trace();
- trace("Friction Init Done.");
- }
- var _loc6_ = undefined;
- if(this.moveShoot == "Parabolic")
- {
- _loc6_ = this.SHOOTSPEED_PARABOLIC;
- }
- if(this.moveShoot == "Rebound")
- {
- _loc6_ = this.SHOOTSPEED_SMALLREBOUND;
- }
- if(this.moveShoot == "Friction")
- {
- _loc6_ = this.SHOOTSPEED_SMALLREBOUND;
- }
- if(this.moveShoot == "Friction")
- {
- this.SHOOTSLOWDOWN_LINEAR -= 0.03;
- var _loc5_ = this.shootVector.getX() / this.shootVector.getNorme() * (_loc6_ * this.SHOOTSLOWDOWN_LINEAR);
- var _loc8_ = this.shootVector.getY() / this.shootVector.getNorme() * (_loc6_ * this.SHOOTSLOWDOWN_LINEAR);
- if(_loc5_ < 0.02 && _loc5_ > -0.02 && _loc8_ < 0.02 && _loc8_ > -0.02)
- {
- this.moveShoot = "None";
- trace("Very Slow !!!!! - End Movement.");
- return false;
- }
- this.moveInField(this.mc._x + _loc5_,this.mc._y + _loc8_);
- return true;
- }
- if(this.moveShoot == "Parabolic" || this.moveShoot == "Rebound")
- {
- _loc5_ = this.shootVector.getX() / this.shootVector.getNorme() * _loc6_;
- _loc8_ = this.shootVector.getY() / this.shootVector.getNorme() * _loc6_;
- var _loc15_ = new Vector2D(new Point2D(this.shootBallPos.getX(),this.shootBallPos.getY()),new Point2D(this.mc._x,this.trueY_mc));
- var _loc12_ = _loc15_.getNorme() / this.shootVector.getNorme();
- var _loc3_ = undefined;
- var _loc4_ = undefined;
- _loc3_ = Math.sin(_loc12_ * 3.141592653589793);
- if(_loc3_ < 0)
- {
- _loc3_ = - _loc3_;
- }
- _loc4_ = _loc3_ * 0.2 * this.shootVector.getNorme();
- if(_loc4_ > 15)
- {
- this.isBallInAir = true;
- }
- else
- {
- this.isBallInAir = false;
- }
- this.trueY_mc += _loc8_;
- this.trueX_mcShadow += _loc5_;
- var _loc7_ = undefined;
- var _loc13_ = this.fakeParabolZoom * this.shootVector.getNorme() / this.MAXSHOOTDIST;
- _loc7_ = _loc13_ * _loc3_;
- if(_loc7_ < 1)
- {
- _loc7_ = 1;
- }
- var _loc2_ = this.initial_scale * _loc7_;
- if(_loc2_ <= this.initial_scale)
- {
- _loc2_ = this.initial_scale;
- }
- this.mc._xscale = _loc2_;
- this.mc._yscale = _loc2_;
- this.mcShadow._xscale = _loc2_;
- this.mcShadow._yscale = _loc2_;
- var _loc9_ = "Linear";
- if(_loc9_ == "Linear")
- {
- this.moveInAir(this.mc._x + _loc5_,this.trueY_mc - _loc4_,this.mcShadow._x + _loc5_,this.mcShadow._y + _loc8_);
- }
- if(_loc9_ == "Decal")
- {
- this.moveInAir(this.mc._x + _loc5_,this.trueY_mc - _loc4_,this.trueX_mcShadow + _loc4_,this.mcShadow._y + _loc8_);
- }
- return true;
- }
- }
- function isBallInAirTest()
- {
- return this.isBallInAir;
- }
- function getMovieClip()
- {
- return this.mc;
- }
- function updateTrueValues()
- {
- this.mcShadow._x = this.mc._x;
- this.mcShadow._y = this.mc._y;
- this.trueY_mc = this.mc._y;
- this.trueX_mcShadow = this.mcShadow._x;
- }
- function interruptMovement()
- {
- if(this.shootInterruption == false)
- {
- this.shootInterruption = true;
- }
- this.updateTrueValues();
- this.setInitialScale();
- }
- function setLinearSpeed(val)
- {
- this.SHOOTSPEED_LINEAR += val / 2;
- }
- function setDefaultLinearSpeed()
- {
- this.SHOOTSPEED_LINEAR = 5;
- }
- function getShootState()
- {
- return this.moveShoot;
- }
- function setInitialScale()
- {
- this.mc._xscale = this.initial_scale;
- this.mc._yscale = this.initial_scale;
- this.mcShadow._xscale = this.initial_scale;
- this.mcShadow._yscale = this.initial_scale;
- }
- function trace()
- {
- trace("Ball - moveShoot : " + this.moveShoot);
- trace("Ball - shootInterruption : " + this.shootInterruption);
- trace("Ball - shootVector : ");
- this.shootVector.trace();
- }
- function tracePosition()
- {
- trace("Ball(x, y) = (" + this.mc._x + "," + this.mc._y + ")");
- }
- }
-