2025-02-07 16:09:00 +08:00
|
|
|
|
using AlicizaX.Runtime;
|
|
|
|
|
using AlicizaX.Timer.Runtime;
|
|
|
|
|
|
|
|
|
|
public static partial class GameApp
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取定时器组件。
|
|
|
|
|
/// </summary>
|
2025-03-20 20:47:26 +08:00
|
|
|
|
public static ITimerModule Timer
|
2025-02-07 16:09:00 +08:00
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
if (_timer == null)
|
|
|
|
|
{
|
2025-03-20 20:47:26 +08:00
|
|
|
|
_timer = ModuleSystem.GetModule<ITimerModule>();
|
2025-02-07 16:09:00 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return _timer;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-20 20:47:26 +08:00
|
|
|
|
private static ITimerModule _timer;
|
|
|
|
|
}
|