using UnityEngine;
|
|
namespace Core.Health
|
{
|
/// <summary>
|
/// Health change info - stores information about the health change
|
/// </summary>
|
public struct HealthChangeInfo
|
{
|
public Damageable damageable;
|
|
public float oldHealth;
|
|
public float newHealth;
|
|
/// <summary>
|
/// 用于标注是由哪个种类的Tower造成的伤害.
|
/// </summary>
|
public int attributeId;
|
|
public IAlignmentProvider damageAlignment;
|
|
public float healthDifference
|
{
|
get { return newHealth - oldHealth; }
|
}
|
|
public float absHealthDifference
|
{
|
get { return Mathf.Abs(healthDifference); }
|
}
|
}
|
}
|