From b504f111f5329b52c3ae19dd66fe9194a42a5301 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20L=C3=BCbe=C3=9F?= Date: Fri, 5 Apr 2024 14:22:16 +0200 Subject: [PATCH] Fixed stupid bug --- 3d Prototyp/Assets/Scripts/TimeManager.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/3d Prototyp/Assets/Scripts/TimeManager.cs b/3d Prototyp/Assets/Scripts/TimeManager.cs index 05524b98..2c34f4da 100644 --- a/3d Prototyp/Assets/Scripts/TimeManager.cs +++ b/3d Prototyp/Assets/Scripts/TimeManager.cs @@ -72,11 +72,12 @@ public class TimeManager : MonoBehaviourSingleton void UpdateTime() { + double oldTotalTime = _totalTime; + _totalTime += Time.deltaTime / _secondsPerDay; - if (_totalTime >= 1.0) + if (Math.Floor(oldTotalTime) < Math.Floor(_totalTime)) { - _totalTime -= 1.0; _daysUntilRelease--; } }