juggle

/** @inheritDoc */
public function advanceTime(time:Number):void
{
if (time == 0 || (mCurrentTime == mTotalTime))
{

Starling.juggler.remove(this);
return;
}

this.mCurrentTime += time;

if (mCurrentTime <= 0)
return;
else if (mCurrentTime > mTotalTime)
mCurrentTime = mTotalTime;

var ratio:Number = mCurrentTime / mTotalTime;

var startValue:Number = this.startExp;
var endValue:Number = this.currExp;
var delta:Number = endValue - startValue;
this.startExp = startValue + ratio * delta;
this.percent = this.startExp / this.currExp;
}

posted @ 2013-11-06 22:03  zhepama  阅读(306)  评论(0编辑  收藏  举报