using UnityEngine; namespace Core.Health { /// /// Health change info - stores information about the health change /// public struct HealthChangeInfo { public Damageable damageable; public float oldHealth; public float newHealth; /// /// 是否存在魔法护盾 /// public bool IsExistShieldWall { get; set; } /// /// 魔法护盾最大生命值 /// public float ShieldWallMaxHealth; /// /// 魔法护盾当前生命值 /// public float ShieldWallCurrentHealth; /// /// 上一次的魔法护盾生命值 /// public float ShieldWallOldHealth; /// /// 用于标注是由哪个种类的Tower造成的伤害. /// public int attributeId; public IAlignmentProvider damageAlignment; public float healthDifference { get { return newHealth - oldHealth; } } public float absHealthDifference { get { return Mathf.Abs(healthDifference); } } public float ShieldWallHealthDifference { get { return ShieldWallCurrentHealth - ShieldWallOldHealth; } } public float AbsShieldWallHealthDifference { get { return Mathf.Abs(ShieldWallHealthDifference); } } } }