From f44ad64eff5c66b711e2b8d28c44c85a92cbc393 Mon Sep 17 00:00:00 2001 From: liuzhiwei <liuzhiwei@qq.com> Date: Fri, 06 Nov 2020 10:08:42 +0800 Subject: [PATCH] Merge branch 'master' of http://172.16.1.52:8090/r/GemBattle into master --- Assets/Scripts/ActionGameFramework/Health/DamageCollider.cs | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/Assets/Scripts/ActionGameFramework/Health/DamageCollider.cs b/Assets/Scripts/ActionGameFramework/Health/DamageCollider.cs index 5b1ed7a..c7a200b 100644 --- a/Assets/Scripts/ActionGameFramework/Health/DamageCollider.cs +++ b/Assets/Scripts/ActionGameFramework/Health/DamageCollider.cs @@ -54,6 +54,16 @@ var agent = this.gameObject.GetComponent<Agent>(); if (agent == null) return; + + BallisticProjectile ballistic = c.gameObject.GetComponent<BallisticProjectile>(); + + if (ballistic.IsHitEnemy) + { + Debug.LogError("--------------------- 已发生过碰撞 ---------------------"); + return; + } + + ballistic.IsHitEnemy = true; LazyLoad(); -- Gitblit v1.9.1