light mode fix
This commit is contained in:
@@ -10,6 +10,8 @@ namespace ReallifeGamemode.Server.Managers
|
||||
{
|
||||
private static Timer realTimeTimer;
|
||||
|
||||
public static TimeSpan CurrentTime { get; private set; }
|
||||
|
||||
public static void StartTimeManager()
|
||||
{
|
||||
if (realTimeTimer == null)
|
||||
@@ -24,11 +26,13 @@ namespace ReallifeGamemode.Server.Managers
|
||||
public static void PauseTimeManager()
|
||||
{
|
||||
realTimeTimer.Stop();
|
||||
CurrentTime = DateTime.Now.TimeOfDay;
|
||||
}
|
||||
|
||||
private static void SetTime(object sender, ElapsedEventArgs args)
|
||||
{
|
||||
DateTime now = DateTime.Now;
|
||||
CurrentTime = now.TimeOfDay;
|
||||
NAPI.World.SetTime(now.Hour, now.Minute, now.Second);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user