몬스터 추격범위 추가, 플레이어 탐지 범위 리팩토링

This commit is contained in:
Mingu Kim
2025-02-10 22:10:03 +09:00
parent 21a173864f
commit 8ffb5deb5d
9 changed files with 197 additions and 9 deletions

View File

@@ -0,0 +1,20 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace TON
{
public class Attack : MonoBehaviour
{
[SerializeField]
private MonsterBase _monsterBase;
private void OnTriggerEnter2D(Collider2D other)
{
if (other.CompareTag("Player"))
{
_monsterBase.Attack(other.gameObject);
}
}
}
}