WakeUpSync.GetSecondsElapsed

This commit is contained in:
JohnCorby 2022-08-14 14:08:16 -07:00
parent ab8429e543
commit b8afa3b292

View File

@ -71,6 +71,11 @@ public class WakeUpSync : NetworkBehaviour
GlobalMessenger.AddListener(OWEvents.WakeUp, OnWakeUp); GlobalMessenger.AddListener(OWEvents.WakeUp, OnWakeUp);
} }
/// <summary>
/// same as TimeLoop.GetSecondsElapsed, but tracks time even when time is not flowing yet
/// </summary>
public static float GetSecondsElapsed() => Time.timeSinceLevelLoad + TimeLoop._timeOffset;
public float GetTimeDifference() public float GetTimeDifference()
{ {
var myTime = Time.timeSinceLevelLoad; var myTime = Time.timeSinceLevelLoad;