mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-07 16:45:10 +00:00
21 lines
540 B
C#
21 lines
540 B
C#
using TEngine.Core;
|
|
#if TENGINE_UNITY
|
|
using UnityEngine;
|
|
#endif
|
|
namespace TEngine
|
|
{
|
|
public sealed class TimerScheduler : Singleton<TimerScheduler>, IUpdateSingleton
|
|
{
|
|
public readonly TimerSchedulerCore Core = new TimerSchedulerCore(() => TimeHelper.Now);
|
|
#if TENGINE_UNITY
|
|
public readonly TimerSchedulerCore Unity = new TimerSchedulerCore(() => (long) (Time.time * 1000));
|
|
#endif
|
|
public void Update()
|
|
{
|
|
Core.Update();
|
|
#if TENGINE_UNITY
|
|
Unity.Update();
|
|
#endif
|
|
}
|
|
}
|
|
} |