From 280a591f3e3afe4cd468e0bc0329a33c0c8a3a70 Mon Sep 17 00:00:00 2001 From: Sehyeon Date: Thu, 15 May 2025 16:06:31 +0900 Subject: [PATCH] =?UTF-8?q?DEG-181=20[Fix]=20=EC=B2=B4=EB=A0=A5=20?= =?UTF-8?q?=EC=B5=9C=EB=8C=80=208=EA=B9=8C=EC=A7=80=EB=A7=8C=20=ED=9A=8C?= =?UTF-8?q?=EB=B3=B5=20=EA=B0=80=EB=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/System/PlayerStats.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/System/PlayerStats.cs b/Assets/Scripts/System/PlayerStats.cs index e00151b6..b405421d 100644 --- a/Assets/Scripts/System/PlayerStats.cs +++ b/Assets/Scripts/System/PlayerStats.cs @@ -348,15 +348,19 @@ public class PlayerStats : MonoBehaviour,ISaveable public float CalculateTimeToWakeUp(float timeStat) { float wakeUpTime = _gameConstants.wakeUpTime; + float remainTime; + if (timeStat < wakeUpTime) // 현재 시간이 0~7시 사이인 경우 { // 당일 오전 8시까지 남은 시간 - return wakeUpTime - timeStat; + remainTime = wakeUpTime - timeStat; } else { - return ( wakeUpTime + 24f ) - timeStat; // 다음 날 오전 8시까지 남은 시간 + remainTime = ( wakeUpTime + 24f ) - timeStat; // 다음 날 오전 8시까지 남은 시간 } + + return Mathf.Min(remainTime, 8f); // 최대 8로 제한 } #region Modify Stats