From 99aeeba01056d2d035274dbed58318edcd68a2bc Mon Sep 17 00:00:00 2001
From: chenxin <chenxin6991@163.com>
Date: Wed, 09 Dec 2020 15:49:11 +0800
Subject: [PATCH] 简单解决泡泡禁锢bug

---
 Assets/Scripts/TowerDefense/UI/EndlessBossSkill/BossSkillBondageBubble.cs |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Assets/Scripts/TowerDefense/UI/EndlessBossSkill/BossSkillBondageBubble.cs b/Assets/Scripts/TowerDefense/UI/EndlessBossSkill/BossSkillBondageBubble.cs
index 3784e0f..a0c88a9 100644
--- a/Assets/Scripts/TowerDefense/UI/EndlessBossSkill/BossSkillBondageBubble.cs
+++ b/Assets/Scripts/TowerDefense/UI/EndlessBossSkill/BossSkillBondageBubble.cs
@@ -73,7 +73,7 @@
                 {
                     Tower tower = EndlessGameUI.instance.FindTowerWithGridIdx(tunelIdList[i] - 1, j);
 
-                    if (tower != null && !tower.IsBondage)
+                    if (tower != null && tower.gameObject.activeInHierarchy && !tower.IsBondage)
                     {
                         tower.IsBondage = true;
                         tower.IsStartBondage = true;
@@ -97,7 +97,7 @@
                 // 只作用于第一排的塔
                 Tower tower = EndlessGameUI.instance.FindTowerWithGridIdx(tunelIdList[i] - 1, 3);
 
-                if (tower != null)
+                if (tower != null && tower.gameObject.activeInHierarchy && !tower.IsBondage)
                 {
                     tower.IsBondage = true;
                     tower.IsStartBondage = true;
@@ -124,7 +124,7 @@
                 {
                     Tower tower = EndlessGameUI.instance.FindTowerWithGridIdx(tunelIdList[i] - 1, j);
 
-                    if (tower != null && !tower.IsBondage)
+                    if (tower != null && tower.gameObject.activeInHierarchy && !tower.IsBondage)
                         towerList.Add(tower);
                 }
 
@@ -157,7 +157,7 @@
                 {
                     Tower tmp = EndlessGameUI.instance.FindTowerWithGridIdx(tunelIdList[i] - 1, j);
 
-                    if (tmp != null && !tmp.IsBondage)
+                    if (tmp != null && tmp.gameObject.activeInHierarchy && !tmp.IsBondage)
                     {
                         if (tower == null)
                             tower = tmp;

--
Gitblit v1.9.1