DEG-166 [Fix] null 오류 체크
This commit is contained in:
parent
2dd70dff2b
commit
c0e6264355
@ -296,11 +296,6 @@ public class PlayerStats : MonoBehaviour
|
||||
// 하루가 실제로 종료된 경우에만 이벤트 발생
|
||||
if (isDayEnded)
|
||||
{
|
||||
// 결근 관련 변수 초기화
|
||||
_hasWorkedToday = false;
|
||||
_hasCheckedAbsenceToday = false;
|
||||
_hasShownBubbleToday = false;
|
||||
|
||||
// 식사 횟수 초기화
|
||||
_mealCount = 0;
|
||||
|
||||
@ -334,6 +329,13 @@ public class PlayerStats : MonoBehaviour
|
||||
EndDay(time, actionType);
|
||||
}
|
||||
|
||||
if (TimeStat >= 8.0f && TimeStat < 9.0f)
|
||||
{
|
||||
_hasWorkedToday = false;
|
||||
_hasCheckedAbsenceToday = false;
|
||||
_hasShownBubbleToday = false;
|
||||
}
|
||||
|
||||
CheckBubble();
|
||||
}
|
||||
|
||||
|
@ -43,17 +43,20 @@ public partial class GameManager : Singleton<GameManager>
|
||||
|
||||
public void StartNPCDialogue(GamePhase phase) // intro, gameplay, end 존재
|
||||
{
|
||||
if(chatWindowController == null)
|
||||
SetChatWindowController();
|
||||
|
||||
chatWindowController.SetGamePhase(phase);
|
||||
StartCoroutine(StartNPCDialogueCoroutine(phase));
|
||||
}
|
||||
|
||||
private void SetChatWindowController()
|
||||
private IEnumerator StartNPCDialogueCoroutine(GamePhase phase)
|
||||
{
|
||||
if (chatWindowController == null)
|
||||
{
|
||||
yield return new WaitForSeconds(0.5f); // 씬 전환 대기
|
||||
chatWindowController = FindObjectOfType<ChatWindowController>();
|
||||
}
|
||||
|
||||
chatWindowController.SetGamePhase(phase);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
//일시 정지
|
||||
@ -90,13 +93,9 @@ public partial class GameManager : Singleton<GameManager>
|
||||
public void ChangeToHomeScene()
|
||||
{
|
||||
SceneManager.LoadScene("ReHousing"); // Home Scene
|
||||
|
||||
if (tryStageCount >= 3) // 엔딩
|
||||
{
|
||||
FailEnd();
|
||||
}
|
||||
|
||||
HandleSceneAudio("Housing");
|
||||
|
||||
if (tryStageCount >= 3) FailEnd(); // 엔딩
|
||||
}
|
||||
|
||||
// TODO: Open Setting Panel 등 Panel 처리
|
||||
|
Loading…
x
Reference in New Issue
Block a user