| | |
| | | |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | 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]; |