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