diff --git a/Assets/KSH/PlayerStats.cs b/Assets/KSH/PlayerStats.cs index b3690490..03cb7b4d 100644 --- a/Assets/KSH/PlayerStats.cs +++ b/Assets/KSH/PlayerStats.cs @@ -51,6 +51,7 @@ public class PlayerStats : MonoBehaviour,ISaveable private bool _isActiveBubble; private bool _hasShownBubbleToday; // 하루에 말풍선 하나만 표시하기 private InteractionAnimationPanelController _interactionAnimation; // 상호작용 패널 Active 여부 확인 + private HousingCanvasController _housingCanvasController; // 돌발 패널 Active 여부 확인 private int _mealCount; public int MealCount => _mealCount; @@ -149,9 +150,15 @@ public class PlayerStats : MonoBehaviour,ISaveable _interactionAnimation = panelController; } + public void SetHousingCanvasController(HousingCanvasController canvasController) + { + _housingCanvasController = canvasController; + } + public void ShowBubble() { if (_interactionAnimation != null && _interactionAnimation.IsPanelActive()) return; + if (_housingCanvasController != null && _housingCanvasController.IsSuddenPanelActive()) return; if(_isActiveBubble) _speechBubbleFollower.ShowMessage(); diff --git a/Assets/KSH/ValueByAction.cs b/Assets/KSH/ValueByAction.cs index 594f0b7f..ac6d84fb 100644 --- a/Assets/KSH/ValueByAction.cs +++ b/Assets/KSH/ValueByAction.cs @@ -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.forcedValue, _gameConstants.forcedValue, 0) }, // 수면 강제(8시 기상) 후 최대 체력 + { ActionType.TeamDinner, new ActionEffect(_gameConstants.forcedValue, +8.0f, 0) }, // 수면 강제(8시 기상) 후 최대 체력 { ActionType.Absence, new ActionEffect(0, 0, -3.0f) } }; } diff --git a/Assets/LIN/Scripts/DailyRoutine/InteractionController.cs b/Assets/LIN/Scripts/DailyRoutine/InteractionController.cs index 951ad303..7be6988d 100644 --- a/Assets/LIN/Scripts/DailyRoutine/InteractionController.cs +++ b/Assets/LIN/Scripts/DailyRoutine/InteractionController.cs @@ -18,6 +18,7 @@ public class InteractionController : MonoBehaviour { PlayerStats.Instance.OnWorked += SuddenAfterWorkEventHappen; PlayerStats.Instance.SetInteractionPanelController(interactionAnimationPanelController); + PlayerStats.Instance.SetHousingCanvasController(housingCanvasController); } // 상호작용 가능한 사물 범위에 들어올 때 diff --git a/Assets/LIN/Scripts/UI/HousingCanvasController.cs b/Assets/LIN/Scripts/UI/HousingCanvasController.cs index 1839b0ef..9ba63d78 100644 --- a/Assets/LIN/Scripts/UI/HousingCanvasController.cs +++ b/Assets/LIN/Scripts/UI/HousingCanvasController.cs @@ -152,6 +152,12 @@ public class HousingCanvasController : MonoBehaviour _autoHideCoroutine = null; } + + public bool IsSuddenPanelActive() + { + return suddenPanel.activeSelf; + } + #endregion }