26 lines
480 B
C#
26 lines
480 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using DragonLi.Frame;
|
|
using UnityEngine;
|
|
|
|
public enum DamagePlayerType
|
|
{
|
|
Helmet,
|
|
Armor
|
|
}
|
|
|
|
public class DamagePlayer : MonoBehaviour, IDamagable
|
|
{
|
|
public Player player;
|
|
|
|
public DamagePlayerType damageType;
|
|
|
|
|
|
public void ApplyDamage(float value, object info, Transform _sender)
|
|
{
|
|
player.ApplyDamage(value, damageType==DamagePlayerType.Helmet, _sender);
|
|
}
|
|
|
|
public float Health { get; set; }
|
|
}
|