From 18f96c9313bf24d2296e615f44fc0ca005f2e872 Mon Sep 17 00:00:00 2001 From: liuzhiwei <liuzhiwei@qq.com> Date: Thu, 12 Nov 2020 16:05:44 +0800 Subject: [PATCH] Merge branch 'master' of http://172.16.1.52:8090/r/GemBattle into master --- Assets/Scripts/Core/Health/DamageableBehaviour.cs | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/Assets/Scripts/Core/Health/DamageableBehaviour.cs b/Assets/Scripts/Core/Health/DamageableBehaviour.cs index 02f73a4..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 { @@ -67,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