TimeManager
Manage timer functions. Register and use TimerEvent. By default, MainTimer is registered.
namespace GarageKit
public class TimeManager : ManagerBase
Inheritance
TimeManager
-> ManagerBase -> MonoBehaviour
Inspector
Properties
member | type | description |
---|---|---|
timerEvents | List<TimerEvent> | タイマーイベントリスト |
Methods
Get reference to main timer
public TimerEvent mainTimer { get; }
Example
// Added timer completion event
AppMain.Instance.timeManager.mainTimer.OnCompleteTimer += (sender) => { Debug.Log("on complete timer"); };
// Start time count 10 seconds
AppMain.Instance.timeManager.mainTimer.StartTimer(10);