public virtual void Update(LTimerContext context) { if (_closed) { return; } if (_loop_timer.Action(context)) { if (_scheduled.size > 0) { bool seq = (_forceWaitSequence && _removeSequenceTask); int index = seq ? 0 : MathUtils.Max(0, _childIndex); Interval i = _scheduled.Get(index); if (i != null) { if (i._loop_timer.Action(context)) { i.Loop(); } if (_forceWaitSequence) { if (i.Completed()) { if (_removeSequenceTask) { _scheduled.RemoveFirst(); } else { _childIndex++; } } else if (i.Completed() && !seq) { _childIndex++; } } else { if (_removeSequenceTask) { _scheduled.RemoveFirst(); } else { _childIndex++; } } } if (_childIndex >= _scheduled.size) { _childIndex = 0; } } } }
public override void Run(LTimerContext time) { if (sched != null) { sched.Update(time); if (sched.Completed()) { Kill(); } } }
public override void Run(LTimerContext time) { if (timer != null) { timer.Action(time); if (timer.IsClosed() || timer.IsCompleted()) { Kill(); } } }
public virtual LTimer AddPercentage(LTimerContext context) { this._currentTick += context.timeSinceLastUpdate; return(this); }
public virtual bool Action(LTimerContext context) { return(Action(context.timeSinceLastUpdate)); }