Skip to content
JuDelCo edited this page May 19, 2021 · 6 revisions

Timer < T > : ITimer

where T : ITimeDeltaEvent

void Dispose();

Timer(float seconds);
Timer(float seconds, Action onCompleted);
Timer(float seconds, Action onCompleted, Func<bool> updateCondition);

Timer(float seconds, Action onCompleted, IService service);
Timer(float seconds, Action onCompleted, State state);

void Reset();
void Reset(Span elapsed);
void Stop();

Span GetDuration();
Span GetElapsedTime();
Span GetTimeLeft();

FrameTimer < T > : IFrameTimer

where T : ITimeEvent

void Dispose();

FrameTimer(int frames);
FrameTimer(int frames, Action onCompleted);
FrameTimer(int frames, Action onCompleted, Func<bool> updateCondition);

FrameTimer(int frames, Action onCompleted, IService service);
FrameTimer(int frames, Action onCompleted, State state);

void Reset();
void Stop();

int GetDuration();
int GetElapsedFrames();
int GetFramesLeft();

Clone this wiki locally