21 lines
429 B
C#
21 lines
429 B
C#
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);
|
|
}
|
|
}
|
|
}
|
|
}
|