From 5afedf1b44f20ec1c7a27092ea37891314c83b45 Mon Sep 17 00:00:00 2001 From: chenxin <chenxin6991@163.com> Date: Thu, 10 Dec 2020 11:47:23 +0800 Subject: [PATCH] 塔拖动到战斗区的时候显示攻击范围 --- Assets/Scripts/Core/Health/DamageableBehaviour.cs | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/Assets/Scripts/Core/Health/DamageableBehaviour.cs b/Assets/Scripts/Core/Health/DamageableBehaviour.cs index 9f754ef..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); -- Gitblit v1.9.1