diff --git a/Assets/LIN/Scripts/DailyRoutine/InteractionController.cs b/Assets/LIN/Scripts/DailyRoutine/InteractionController.cs index 5f7212f1..affd6d91 100644 --- a/Assets/LIN/Scripts/DailyRoutine/InteractionController.cs +++ b/Assets/LIN/Scripts/DailyRoutine/InteractionController.cs @@ -22,6 +22,14 @@ public class InteractionController : MonoBehaviour PlayerStats.Instance.SetHousingCanvasController(housingCanvasController); } + /// + /// 출근 후 돌발 이벤트 발생을 위한 구독 취소 + /// + public void ReSetAfterWorkEvent() + { + PlayerStats.Instance.OnWorked -= SuddenAfterWorkEventHappen; + } + // 상호작용 가능한 사물 범위에 들어올 때 private void OnTriggerEnter(Collider other) { diff --git a/Assets/LIN/Scripts/UI/HousingConstants.cs b/Assets/LIN/Scripts/UI/HousingConstants.cs index 931012e5..68dacbb9 100644 --- a/Assets/LIN/Scripts/UI/HousingConstants.cs +++ b/Assets/LIN/Scripts/UI/HousingConstants.cs @@ -13,7 +13,7 @@ public enum AfterWorkEventType public static class HousingConstants { //돌발 이벤트 확률 계산 - public static int AFTER_WORK_DENOMINATOR = 2; + public static int AFTER_WORK_DENOMINATOR = 4; //돌발 이벤트 보여줄 시간 public static float SUDDENEVENT_IAMGE_SHOW_TIME = 4.0f; //전환효과(Switching) 패널 애니메이션 시간 diff --git a/Assets/Scripts/Common/GameManager.cs b/Assets/Scripts/Common/GameManager.cs index 3e819e6f..8b76d58a 100644 --- a/Assets/Scripts/Common/GameManager.cs +++ b/Assets/Scripts/Common/GameManager.cs @@ -102,6 +102,10 @@ public partial class GameManager : Singleton,ISaveable public void ChangeToGameScene() { tryStageCount++; // 던전 시도 횟수 증가 + + InteractionController interactionController = FindObjectOfType(); + interactionController.ReSetAfterWorkEvent(); + var switchingPanel = PanelManager.GetPanel("SwitchingPanel").GetComponent(); switchingPanel.FadeAndSceneLoad("ReDungeon"); // 던전 Scene HandleSceneAudio("Dungeon");