Allows to check in huge intervals. Should only be used with interval values above Delta,
otherwise it will always return true as the Total time is only updated once per Update tick.
We subtract Delta since Total already includes this update tick's Delta.
View code on GitHub
Namespace: DeltaEngine.EntitiesAssembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Parameters
- interval
- Type: System.Single
Return Value
Type: BooleanRemarks
Examples
[Test] public void CheckEveryIsFalseIfItDidNotCrossTheIntervalThisFrame() { Time.Total = 0.4f; Time.Delta = 0.2f; Assert.IsFalse(Time.CheckEvery(0.5f)); }
[Test] public void CheckEveryIsTrueIfItDidCrossTheIntervalThisFrame() { Time.Total = 0.6f; Time.Delta = 0.2f; Assert.IsTrue(Time.CheckEvery(0.5f)); }
See Also