| | |
| | | { |
| | | 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; |
| | |
| | | // 只作用于第一排的塔 |
| | | 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; |
| | |
| | | { |
| | | 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); |
| | | } |
| | | |
| | |
| | | { |
| | | 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; |