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); } }