Timers and wait conditions are a key feature in game development. This package contain a comprehensive, effective and easy set of C# classes to use implementation for timer and wait condition, that will speed up your development and reduce the bugs, and avoiding spread and repeat timer codes on your Update methods or overuse Coroutines,
This package contains three timer blocks for use in Unity development.
1) SingleTimer: A timer to be used to trigger a function one or more times in a defined period.
SingleTimer timer1 = new SingleTimer(2.0f, TimerFunction);
2) ConditionTimer: A wait to a condition class to test any condition, with timeout, and callback function
ConditionTimer timer2 = new ConditionTimer(LowHealth, RecoverHealth, 10.0f);
3) TimerBlock: A class to implement a centralized solution for your timer and wait condition needs This class implements a timer manager that allows you to schedule tasks and add wait conditions in a single place.
mainTimer = new TimerBlock(timeBase);
// Add an wait condition
mainTimer.Wait(waitCondition, doAction, timeOut);
// Add a scheduled action
mainTimer.Schedule(callback, time, repeat);
4) TimerManager: A ready to use prefab implementing a time manager using TimerBlock class. This Prefab runs across scenes and is not destroyed.