From 09053388ef6d58a7de59fab450c11ee0affbceb2 Mon Sep 17 00:00:00 2001
From: chenxin <chenxin6991@163.com>
Date: Fri, 20 Nov 2020 11:50:55 +0800
Subject: [PATCH] Merge commit 'fafc11ad74601a1c4e4b2e28165af25bd19bb5a9' into master

---
 Assets/Scripts/TowerDefense/UI/EndlessBossSkill/BossSkillBubbleBomb.cs |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/Assets/Scripts/TowerDefense/UI/EndlessBossSkill/BossSkillBubbleBomb.cs b/Assets/Scripts/TowerDefense/UI/EndlessBossSkill/BossSkillBubbleBomb.cs
index d3d58ab..8ac98e2 100644
--- a/Assets/Scripts/TowerDefense/UI/EndlessBossSkill/BossSkillBubbleBomb.cs
+++ b/Assets/Scripts/TowerDefense/UI/EndlessBossSkill/BossSkillBubbleBomb.cs
@@ -376,6 +376,8 @@
             {
                 BubbleBombConfig config = bubbleBombList[i];
 
+                if (config.Agent == null || config.obj == null) continue;
+
                 // 泡泡炸弹已经触发了攻击,延时一会过后掉爱心
                 if (config.IsAttack)
                 {
@@ -420,7 +422,7 @@
                 }
 
                 // 更新移动
-                if (config.Agent.CanMove)
+                if (config.Agent != null && config.Agent.CanMove)
                 {
                     Vector3 pos = config.obj.transform.position;
                     pos.z -= deltaTime * config.MoveSpeed;
@@ -432,11 +434,6 @@
                         config.IsAttack = true;
                         config.AttackTime = 0.65f;
                     }
-                }
-                else
-                {
-                    // cx test
-                    Debug.LogError("---- 泡泡炸弹不能移动??? ----");
                 }
             }
         }

--
Gitblit v1.9.1