remove obstacle

This commit is contained in:
2026-06-04 11:50:09 +07:00
parent 162deaf34f
commit 5526341041
50 changed files with 399 additions and 2097 deletions

View File

@@ -60,31 +60,31 @@ namespace OnlyScove.Scripts
}
}
protected override void PerformInteraction(PlayerStateMachine player)
{
Debug.Log($"[Interaction] PerformInteraction CALLED on {gameObject.name}!");
// 1. Ưu tiên script của Door Pack (Wood Door Script)
if (woodDoorScript != null)
{
Debug.Log($"[Interaction] Calling woodDoorScript.OpenDoor() on {gameObject.name}. Previous state: {woodDoorScript.open}");
woodDoorScript.OpenDoor();
isOpen = woodDoorScript.open;
Debug.Log($"[Interaction] New state: {woodDoorScript.open}");
return;
}
// 2. Nếu không có script Pack mới dùng Animator
if (animator != null)
{
isOpen = !isOpen;
animator.SetBool(boolParameterName, isOpen);
Debug.Log($"[Interaction] Triggered Animator: {boolParameterName} = {isOpen}");
}
else
{
Debug.LogError($"[Interaction] FAILED: No woodDoorScript or animator found on {gameObject.name}");
}
}
// protected override void PerformInteraction(PlayerStateMachine player)
// {
// Debug.Log($"[Interaction] PerformInteraction CALLED on {gameObject.name}!");
//
// // 1. Ưu tiên script của Door Pack (Wood Door Script)
// if (woodDoorScript != null)
// {
// Debug.Log($"[Interaction] Calling woodDoorScript.OpenDoor() on {gameObject.name}. Previous state: {woodDoorScript.open}");
// woodDoorScript.OpenDoor();
// isOpen = woodDoorScript.open;
// Debug.Log($"[Interaction] New state: {woodDoorScript.open}");
// return;
// }
//
// // 2. Nếu không có script Pack mới dùng Animator
// if (animator != null)
// {
// isOpen = !isOpen;
// animator.SetBool(boolParameterName, isOpen);
// Debug.Log($"[Interaction] Triggered Animator: {boolParameterName} = {isOpen}");
// }
// else
// {
// Debug.LogError($"[Interaction] FAILED: No woodDoorScript or animator found on {gameObject.name}");
// }
// }
}
}