当前位置: 首页 > 工具软件 > juggle > 使用案例 >

juggle

郏稳
2023-12-01

/** @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;
}

 类似资料:

相关阅读

相关文章

相关问答