몬스터가 플레이어 추격, 공격하도록 수정

This commit is contained in:
Mingu Kim
2025-02-14 02:49:11 +09:00
parent 82e3264e2d
commit 315188704c
4 changed files with 59 additions and 108 deletions

View File

@@ -1,3 +1,4 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
@@ -14,8 +15,14 @@ namespace TON
if (other.CompareTag("Player"))
{
_monsterBase.SetTransition(new AttackState());
// _monsterBase.Attack(other.gameObject);
}
}
private void OnTriggerExit2D(Collider2D other)
{
_monsterBase.SetTransition(new ChasingState());
Debug.Log("감지 벗어남");
}
}
}