GameMain Scene 정리, 구형 프리팹 제거
This commit is contained in:
@@ -37,6 +37,7 @@ namespace Northbound
|
||||
private EquipmentData _pendingEquipmentData;
|
||||
private string _currentEquipmentSocket;
|
||||
private bool _isInteracting = false;
|
||||
private Coroutine _interactionTimeoutCoroutine;
|
||||
|
||||
// 다른 컴포넌트가 이동 차단 여부를 확인할 수 있도록 public 프로퍼티 제공
|
||||
public bool IsInteracting => _isInteracting;
|
||||
@@ -134,6 +135,8 @@ namespace Northbound
|
||||
if (playAnimations && _animator != null && hasAnimation)
|
||||
{
|
||||
_animator.SetTrigger(animTrigger);
|
||||
// 애니메이션 완료를 보장하기 위해 타임아웃 코루틴 시작
|
||||
_interactionTimeoutCoroutine = StartCoroutine(InteractionTimeout(3f));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -176,6 +179,11 @@ namespace Northbound
|
||||
|
||||
public void OnInteractionComplete()
|
||||
{
|
||||
if (_interactionTimeoutCoroutine != null)
|
||||
{
|
||||
StopCoroutine(_interactionTimeoutCoroutine);
|
||||
_interactionTimeoutCoroutine = null;
|
||||
}
|
||||
_isInteracting = false;
|
||||
Debug.Log("[PlayerInteraction] 상호작용 완료");
|
||||
}
|
||||
@@ -224,6 +232,17 @@ namespace Northbound
|
||||
}
|
||||
}
|
||||
|
||||
private System.Collections.IEnumerator InteractionTimeout(float timeout)
|
||||
{
|
||||
yield return new WaitForSeconds(timeout);
|
||||
if (_isInteracting)
|
||||
{
|
||||
Debug.LogWarning("[PlayerInteraction] Interaction timeout - forcing completion");
|
||||
_isInteracting = false;
|
||||
_interactionTimeoutCoroutine = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
if (!IsOwner || _currentInteractable == null) return;
|
||||
|
||||
Reference in New Issue
Block a user