From a5e4a87633a8493713735cb1aa7c25474202617b Mon Sep 17 00:00:00 2001
From: chenxin <chenxin6991@163.com>
Date: Fri, 04 Dec 2020 18:24:02 +0800
Subject: [PATCH] 禁锢泡泡只作用于第一排塔

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

diff --git a/Assets/Scripts/TowerDefense/UI/EndlessBossSkill/BossSkillBondageBubble.cs b/Assets/Scripts/TowerDefense/UI/EndlessBossSkill/BossSkillBondageBubble.cs
index 66e564b..3784e0f 100644
--- a/Assets/Scripts/TowerDefense/UI/EndlessBossSkill/BossSkillBondageBubble.cs
+++ b/Assets/Scripts/TowerDefense/UI/EndlessBossSkill/BossSkillBondageBubble.cs
@@ -94,21 +94,18 @@
 
             for (int i = 0; i < tunelIdList.Count; ++i)
             {
-                // 倒着找,如果第一排塔被摧毁,再找第二排塔
-                for (int j = dy - 1; j >= dy - attackRows; --j)
-                {
-                    Tower tower = EndlessGameUI.instance.FindTowerWithGridIdx(tunelIdList[i] - 1, j);
+                // 只作用于第一排的塔
+                Tower tower = EndlessGameUI.instance.FindTowerWithGridIdx(tunelIdList[i] - 1, 3);
 
-                    if (tower != null && !tower.IsBondage)
-                    {
-                        tower.IsBondage = true;
-                        tower.IsStartBondage = true;
-                        tower.BondageTime = SkillData.effect[0];
-                        tower.BondageClickDecreaseTime = SkillData.effect[1];
-                        tower.BondageWarningTime = BondageTime;
-                        tower.BondageWarning();
-                        break;
-                    }
+                if (tower != null)
+                {
+                    tower.IsBondage = true;
+                    tower.IsStartBondage = true;
+                    tower.BondageTime = SkillData.effect[0];
+                    tower.BondageClickDecreaseTime = SkillData.effect[1];
+                    tower.BondageWarningTime = BondageTime;
+                    tower.BondageWarning();
+                    break;
                 }
             }
         }
@@ -133,7 +130,9 @@
 
                 if (towerList.Count > 0)
                 {
-                    int random = UnityEngine.Random.Range(0, towerList.Count);
+                    // 现在只作用于第一排的塔
+                    // int random = UnityEngine.Random.Range(0, towerList.Count);
+                    int random = 0;
                     towerList[random].IsBondage = true;
                     towerList[random].IsStartBondage = true;
                     towerList[random].BondageTime = SkillData.effect[0];

--
Gitblit v1.9.1