Class WorldTimer
A timer that runs an action in the world at a specified interval.
public class WorldTimer : IDisposable
- Inheritance
-
WorldTimer
- Implements
- Inherited Members
- Extension Methods
Methods
Dispose()
Disposes of the timer, stopping it if it is enabled.
public void Dispose()
Start(Action<World>?, Func<object, TimeSpan>)
Start the WorldTimer class with a specified delay action.
public void Start(Action<World>? action, Func<object, TimeSpan> delayAction)
Parameters
actionAction<World>The action to run in the world.
delayActionFunc<object, TimeSpan>The function that returns the delay based on an object.
Start(Action<World>?, TimeSpan)
Start the WorldTimer class with a specified delay.
public void Start(Action<World>? action, TimeSpan delay)
Parameters
actionAction<World>The action to run in the world.
delayTimeSpanThe delay between runs of the action.
Stop()
Stops the timer, unsubscribing from the update event and disabling the timer.
public void Stop()