게이트 이동 시스템 추가 및 기존 이동 매니저 정리

This commit is contained in:
dldydtn9755-crypto
2026-06-22 11:28:53 +09:00
parent f443c4a4de
commit 6fc20431e8
57 changed files with 767 additions and 435 deletions

View File

@@ -0,0 +1,53 @@
using UnityEngine;
public class RoomClearGateController : MonoBehaviour
{
[Header("방 클리어 후 열릴 게이트")]
[SerializeField] private RoomExitGate exitGate;
private bool isRoomCleared = false;
private bool gateOpened = false;
public bool IsRoomCleared => isRoomCleared;
// 블랙잭 최종 승리 후 호출
// 이 함수는 게이트를 바로 열지 않고, "방 클리어 완료" 상태만 저장함
public void MarkRoomCleared()
{
isRoomCleared = true;
Debug.Log("방 클리어 완료. 이제 오픈존에 들어가면 게이트가 열립니다.");
}
// 오픈존에 들어갔을 때 호출
public void OpenClearGate()
{
if (!isRoomCleared)
{
Debug.Log("아직 방 클리어 전이라 게이트를 열 수 없습니다.");
return;
}
if (gateOpened)
{
return;
}
gateOpened = true;
if (exitGate != null)
{
exitGate.OpenGate();
Debug.Log("방 클리어 게이트 오픈");
}
else
{
Debug.LogWarning("Exit Gate가 연결되지 않았습니다.");
}
}
public void ResetClearState()
{
isRoomCleared = false;
gateOpened = false;
}
}