public override void Run(float time) { //计算时间差 float offsetTime = time - currentTime; if (offsetTime >= delayTime) { this.callBack(offsetTime - delayTime); TimeManager.Get().RemoveTimer(this); } }
public override void Run(float time) { //计算时间差 float offsetTime = time - currentTime; //到达时间后自动移除该计时器 if (offsetTime >= delayTime) { TimeManager.Get().RemoveTimer(this); } else { this.callBack(time); } }