Files
Loong/Assets/_Loong/Scripts/DamagePart.cs
2025-10-25 18:32:49 +08:00

21 lines
558 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DamagePart : MonoBehaviour, Damagable
{
public Agent parent;
public void ApplyDamage(float value, int ownerIndex, Vector3 hitPos, Transform sender)
{
Debug.Log("部位受击:" + value);
// 传递伤害
parent.ApplyDamage(value, ownerIndex, hitPos, sender);
// 插在身上
sender.parent = transform.parent;
if(value<10)
return;
GameManager.Ins.PlayerGetEx((int)value,hitPos);
}
}