public bool TickPassed(ref TTick tick, double val) { foreach (var t in this.ticks) { if (val == t.Value || (val - t.Value) * (this.lastVal - t.Value) < 0.0) { tick = t; this.lastVal = val; return(true); } } this.lastVal = val; return(false); }
public bool TickPassed(ref TTick tick, double val) { foreach (var t in this.ticks) { if (val == t.Value || (val - t.Value) * (this.lastVal - t.Value) < 0.0) { tick = t; this.lastVal = val; return true; } } this.lastVal = val; return false; }
protected virtual State DoTick(TTick deltaTime) { return(this); }
public State Tick(TTick deltaTime) { Timer.Increase(deltaTime); return(DoTick(deltaTime)); }
public void RedefineTimer(TTick total) { Timer.Redefine(total); }
public bool TickPassed(double val) { var tick = new TTick(); return(TickPassed(ref tick, val)); }
public bool TickPassed(double val) { var tick = new TTick(); return TickPassed(ref tick, val); }