Files
XMen/Assets/Scripts/Enemy/EnemyIDamagable.cs
2025-07-02 17:56:55 +08:00

21 lines
479 B
C#

using DragonLi.Frame;
using Unity.VisualScripting;
using UnityEngine;
public class EnemyIDamagable : MonoBehaviour,IDamagable
{
public Enemy curEnemy;
public Player player;
public void ApplyDamage(float value, object info, Transform _sender)
{
if (player != null)
{
player.ApplyDamage(value, info, _sender);
return;
}
curEnemy.ChangeHp(value, info, _sender);
}
public float Health { get; set; }
}