mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
[+] TEngineServer
[+] TEngineServer
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user