From ae487b742c792c43b81cce6f060b881e5609d160 Mon Sep 17 00:00:00 2001 From: liuzhiwei <liuzhiwei@qq.com> Date: Tue, 08 Dec 2020 11:48:26 +0800 Subject: [PATCH] Merge branch 'master' of http://172.16.1.52:8090/r/GemBattle into master --- Assets/Scripts/ActionGameFramework/Health/DamageCollider.cs | 14 +++----------- 1 files changed, 3 insertions(+), 11 deletions(-) diff --git a/Assets/Scripts/ActionGameFramework/Health/DamageCollider.cs b/Assets/Scripts/ActionGameFramework/Health/DamageCollider.cs index c7a200b..b39d49a 100644 --- a/Assets/Scripts/ActionGameFramework/Health/DamageCollider.cs +++ b/Assets/Scripts/ActionGameFramework/Health/DamageCollider.cs @@ -52,23 +52,15 @@ // 非Agent不参与碰撞: var agent = this.gameObject.GetComponent<Agent>(); - if (agent == null) + if (agent == null || agent.isDead) return; - + BallisticProjectile ballistic = c.gameObject.GetComponent<BallisticProjectile>(); - - if (ballistic.IsHitEnemy) - { - Debug.LogError("--------------------- 已发生过碰撞 ---------------------"); - return; - } - - ballistic.IsHitEnemy = true; LazyLoad(); BallisticAttack ballisticAttack = damager.GetComponent<BallisticAttack>(); - ballisticAttack.DealDamage((Targetable)damageableBehaviour); + ballisticAttack.DealDamage((Targetable)damageableBehaviour, damager.IsEnhancedBullet); damager.HasDamaged(c.transform.position, damageableBehaviour.configuration.alignmentProvider); } -- Gitblit v1.9.1