From 172d8ffbf5fe3bdd60b3d71a3a60feeed1cb1762 Mon Sep 17 00:00:00 2001 From: chenxin <chenxin6991@163.com> Date: Mon, 09 Nov 2020 16:37:47 +0800 Subject: [PATCH] Merge commit '894e974d944190fb2e10e14827f0d878626bd048' into master --- Assets/Scripts/Core/Health/HealthChangeInfo.cs | 74 ++++++++++++++++++++++++++----------- 1 files changed, 52 insertions(+), 22 deletions(-) diff --git a/Assets/Scripts/Core/Health/HealthChangeInfo.cs b/Assets/Scripts/Core/Health/HealthChangeInfo.cs index ae969ed..00c7917 100644 --- a/Assets/Scripts/Core/Health/HealthChangeInfo.cs +++ b/Assets/Scripts/Core/Health/HealthChangeInfo.cs @@ -2,32 +2,62 @@ namespace Core.Health { - /// <summary> - /// Health change info - stores information about the health change - /// </summary> - public struct HealthChangeInfo - { - public Damageable damageable; + /// <summary> + /// Health change info - stores information about the health change + /// </summary> + public struct HealthChangeInfo + { + public Damageable damageable; - public float oldHealth; + public float oldHealth; - public float newHealth; + public float newHealth; - /// <summary> - /// 用于标注是由哪个种类的Tower造成的伤害. - /// </summary> - public int attributeId; + /// <summary> + /// 是否存在魔法护盾 + /// </summary> + public bool IsExistShieldWall { get; set; } - public IAlignmentProvider damageAlignment; + /// <summary> + /// 魔法护盾最大生命值 + /// </summary> + public float ShieldWallMaxHealth; - public float healthDifference - { - get { return newHealth - oldHealth; } - } + /// <summary> + /// 魔法护盾当前生命值 + /// </summary> + public float ShieldWallCurrentHealth; - public float absHealthDifference - { - get { return Mathf.Abs(healthDifference); } - } - } + /// <summary> + /// 上一次的魔法护盾生命值 + /// </summary> + public float ShieldWallOldHealth; + + /// <summary> + /// 用于标注是由哪个种类的Tower造成的伤害. + /// </summary> + 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); } + } + } } \ No newline at end of file -- Gitblit v1.9.1