diff --git a/Assets/KSH/GameConstants.cs b/Assets/KSH/GameConstants.cs index d42c6808..2bd483bb 100644 --- a/Assets/KSH/GameConstants.cs +++ b/Assets/KSH/GameConstants.cs @@ -35,10 +35,7 @@ public class GameConstants // 기상 시간 public float wakeUpTime = 8.0f; - // 오전 8시 기상 값 - public float wakeUpAtEight = 888f; - - // 강제 값 (탈진, 결근-늦잠) + // 수면 이벤트 강제 값 public float forcedValue = 999f; // 날짜 한계 값 diff --git a/Assets/KSH/PlayerStats.cs b/Assets/KSH/PlayerStats.cs index be92e15b..68bde807 100644 --- a/Assets/KSH/PlayerStats.cs +++ b/Assets/KSH/PlayerStats.cs @@ -73,7 +73,7 @@ public class PlayerStats : MonoBehaviour bool isDayEnded = false; // 수면 행동 처리 - if (actionType == ActionType.Sleep) // 다음 날 오전 8시 기상 + if (actionType == ActionType.Sleep || actionType == ActionType.TeamDinner) // 다음 날 오전 8시 기상 { // 다음 날 오전 8시 - 현재 시간 값 float nowTime = TimeStat - time; @@ -178,7 +178,8 @@ public class PlayerStats : MonoBehaviour public void ModifyReputation(float reputation) { - ReputationStat += reputation; + // float 연산 시 계산 오차가 발생할 수도 있기에 소수점 두 번째에서 반올림하도록 처리 + ReputationStat = Mathf.Round((ReputationStat + reputation) * 100f) / 100f; if (ReputationStat <= 0) { diff --git a/Assets/KSH/ValueByAction.cs b/Assets/KSH/ValueByAction.cs index 7e66a79a..594f0b7f 100644 --- a/Assets/KSH/ValueByAction.cs +++ b/Assets/KSH/ValueByAction.cs @@ -33,7 +33,7 @@ public class ValueByAction actionEffects = new Dictionary { // 기본 액션들, 효과(시간, 체력, 평판 순) - { ActionType.Sleep, new ActionEffect(_gameConstants.wakeUpAtEight, 0, 0) }, // 8시 강제 기상 + { ActionType.Sleep, new ActionEffect(_gameConstants.forcedValue, 0, 0) }, // 8시 강제 기상 { ActionType.OverSlept, new ActionEffect(_gameConstants.forcedValue, 0, 0) }, // 결근 (오후 3~6시 기상) { ActionType.ForcedSleep, new ActionEffect(_gameConstants.forcedValue, 4, 0) }, // 탈진 { ActionType.Eat, new ActionEffect(+1.0f, +1.0f, 0) }, @@ -41,7 +41,7 @@ public class ValueByAction { ActionType.Dungeon, new ActionEffect(+3.0f, -3.0f, 0) }, { ActionType.Housework, new ActionEffect(+1.0f, -1.0f, +0.2f) }, { ActionType.OvertimeWork, new ActionEffect(+4.0f, -5.0f, +1.0f) }, - { ActionType.TeamDinner, new ActionEffect(_gameConstants.wakeUpAtEight, _gameConstants.forcedValue, 0) }, // 수면 강제(8시 기상) 후 최대 체력 + { ActionType.TeamDinner, new ActionEffect(_gameConstants.forcedValue, _gameConstants.forcedValue, 0) }, // 수면 강제(8시 기상) 후 최대 체력 { ActionType.Absence, new ActionEffect(0, 0, -3.0f) } }; }