몬스터 스킬 확률 제거

This commit is contained in:
Mingu Kim
2025-02-16 22:05:00 +09:00
parent 682d6f9fc2
commit d6975c623f
3 changed files with 66 additions and 13 deletions

View File

@@ -15,16 +15,18 @@ namespace TON
{
if (other.CompareTag("Player"))
{
// 30% 확률로 스킬 사용, 70% 확률로 추격 후 근접 공격
if (Random.Range(0, 10) < 3) // 0~9 사이의 난수 생성, 3 미만이면 30% 확률
{
_monsterBase.SetTransition(new MonsterSkillState());
}
else
{
// 플레이어 감지하면 따라가기
_monsterBase.SetTransition(new ChasingState());
}
_monsterBase.SetTransition(new MonsterSkillState());
// // 30% 확률로 스킬 사용, 70% 확률로 추격 후 근접 공격
// if (Random.Range(0, 10) < 3) // 0~9 사이의 난수 생성, 3 미만이면 30% 확률
// {
// _monsterBase.SetTransition(new MonsterSkillState());
// }
// else
// {
// // 플레이어 감지하면 따라가기
// _monsterBase.SetTransition(new ChasingState());
// }
Debug.Log("감지됨");