몬스터 IsDetect가 false되는 코드 수정

This commit is contained in:
Mingu Kim
2025-02-20 16:00:33 +09:00
parent bd76108c59
commit b862da2a48

View File

@@ -16,21 +16,15 @@ namespace TON
if (other.CompareTag("Player")) if (other.CompareTag("Player"))
{ {
_monsterBase.IsDetect = true; _monsterBase.IsDetect = true;
// _monsterBase.SetTransition(new MonsterSkillState());
//
// Debug.Log("감지됨");
} }
} }
private void OnTriggerExit2D(Collider2D other) private void OnTriggerExit2D(Collider2D other)
{ {
_monsterBase.IsDetect = false; if (other.CompareTag("Player"))
// {
// _monsterBase.SetTransition(new IdleState()); _monsterBase.IsDetect = false;
// }
// Debug.Log("감지 벗어남");
} }
} }
} }