DEG-181 [Fix] 체력 최대 8까지만 회복 가능
This commit is contained in:
parent
4d0167f45b
commit
280a591f3e
@ -348,15 +348,19 @@ public class PlayerStats : MonoBehaviour,ISaveable
|
|||||||
public float CalculateTimeToWakeUp(float timeStat)
|
public float CalculateTimeToWakeUp(float timeStat)
|
||||||
{
|
{
|
||||||
float wakeUpTime = _gameConstants.wakeUpTime;
|
float wakeUpTime = _gameConstants.wakeUpTime;
|
||||||
|
float remainTime;
|
||||||
|
|
||||||
if (timeStat < wakeUpTime) // 현재 시간이 0~7시 사이인 경우
|
if (timeStat < wakeUpTime) // 현재 시간이 0~7시 사이인 경우
|
||||||
{
|
{
|
||||||
// 당일 오전 8시까지 남은 시간
|
// 당일 오전 8시까지 남은 시간
|
||||||
return wakeUpTime - timeStat;
|
remainTime = wakeUpTime - timeStat;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return ( wakeUpTime + 24f ) - timeStat; // 다음 날 오전 8시까지 남은 시간
|
remainTime = ( wakeUpTime + 24f ) - timeStat; // 다음 날 오전 8시까지 남은 시간
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return Mathf.Min(remainTime, 8f); // 최대 8로 제한
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Modify Stats
|
#region Modify Stats
|
||||||
|
Loading…
x
Reference in New Issue
Block a user