25 lines
620 B
C#
25 lines
620 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using DragonLi.Frame;
|
|
using UnityEngine;
|
|
|
|
public class DamageBox : MonoBehaviour,Damagable
|
|
|
|
{
|
|
public float Health { get; set; }
|
|
|
|
public Agent agent;
|
|
|
|
public void ApplyDamage(float value, int ownerIndex, Vector3 hitPos, Transform sender)
|
|
{
|
|
Debug.Log("部位受击:" + value);
|
|
// 传递伤害
|
|
agent.ApplyDamage(value, ownerIndex, hitPos, sender);
|
|
// 插在身上
|
|
sender.parent = transform.parent;
|
|
if(value<10)
|
|
return;
|
|
GameManager.Ins.PlayerGetEx((int)value,hitPos);
|
|
}
|
|
}
|