From 1fe72e022dad01d87d64ba90d22db110029b8136 Mon Sep 17 00:00:00 2001 From: wangguan <wangguan@kt007.com> Date: Sat, 26 Dec 2020 15:37:51 +0800 Subject: [PATCH] 召唤分身UI出现会把技能特效遮盖 --- Assets/Scripts/Core/Health/DamageableBehaviour.cs | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/Core/Health/DamageableBehaviour.cs b/Assets/Scripts/Core/Health/DamageableBehaviour.cs index f7b32ef..771d3a0 100644 --- a/Assets/Scripts/Core/Health/DamageableBehaviour.cs +++ b/Assets/Scripts/Core/Health/DamageableBehaviour.cs @@ -1,5 +1,7 @@ using System; using UnityEngine; +using KTGMGemClient; +using TowerDefense.Agents; namespace Core.Health { @@ -54,7 +56,6 @@ /// </summary> public event Action<DamageableBehaviour> died; - /// <summary> /// Takes the damage and also provides a position for the damage being dealt /// </summary> @@ -68,6 +69,10 @@ info.attributeId = attributeId; configuration.TakeDamage(damageValue, alignment, ref info); var damageInfo = new HitInfo(info, damagePoint); + EventCenter.Ins.BroadCast((int)KTGMGemClient.EventType.EndlessAgentTaskDamage, damageInfo.healthChangeInfo.absHealthDifference); + if (attributeId == 0) + EventCenter.Ins.BroadCast((int)KTGMGemClient.EventType.EndlessOneHit); + if (hit != null) { hit(damageInfo); @@ -114,7 +119,7 @@ /// <summary> /// Fires the removed event /// </summary> - void OnRemoved() + protected void OnRemoved() { if (removed != null) { -- Gitblit v1.9.1