From 93f67abd5fe45178f48ce7db675bbfe007bfc9e7 Mon Sep 17 00:00:00 2001 From: chenxin <chenxin6991@163.com> Date: Wed, 18 Nov 2020 19:25:29 +0800 Subject: [PATCH] 按钮恢复成原来资源 打包 --- Assets/Scripts/ActionGameFramework/Health/DamageCollider.cs | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/ActionGameFramework/Health/DamageCollider.cs b/Assets/Scripts/ActionGameFramework/Health/DamageCollider.cs index 5b1ed7a..d7aee7a 100644 --- a/Assets/Scripts/ActionGameFramework/Health/DamageCollider.cs +++ b/Assets/Scripts/ActionGameFramework/Health/DamageCollider.cs @@ -52,13 +52,15 @@ // 非Agent不参与碰撞: var agent = this.gameObject.GetComponent<Agent>(); - if (agent == null) + if (agent == null || agent.isDead) return; + + BallisticProjectile ballistic = c.gameObject.GetComponent<BallisticProjectile>(); LazyLoad(); BallisticAttack ballisticAttack = damager.GetComponent<BallisticAttack>(); - ballisticAttack.DealDamage((Targetable)damageableBehaviour); + ballisticAttack.DealDamage((Targetable)damageableBehaviour, ballisticAttack.attributeId); damager.HasDamaged(c.transform.position, damageableBehaviour.configuration.alignmentProvider); } -- Gitblit v1.9.1