| | |
| | | using System; |
| | | using System.Collections; |
| | | using System; |
| | | using ActionGameFramework.Health; |
| | | using Core.Utilities; |
| | | using TowerDefense.Level; |
| | |
| | | { |
| | | if (attack && (this.curActionState != 2)) |
| | | { |
| | | currentTowerLevel.SetTowerMonsterMat(materialTowerAttackOppo); |
| | | currentTowerLevel.SetTowerMonsterMat(materialTowerAttackOppo, true); |
| | | this.curActionState = 2; |
| | | } |
| | | |
| | | if ((!attack) && (this.curActionState != 1)) |
| | | { |
| | | currentTowerLevel.SetTowerMonsterMat(materialTowerWaitOppo); |
| | | currentTowerLevel.SetTowerMonsterMat(materialTowerWaitOppo, false); |
| | | this.curActionState = 1; |
| | | } |
| | | } |
| | |
| | | { |
| | | if (attack && (this.curActionState != 2)) |
| | | { |
| | | currentTowerLevel.SetTowerMonsterMat(materialTowerAttackSelf); |
| | | currentTowerLevel.SetTowerMonsterMat(materialTowerAttackSelf, true); |
| | | this.curActionState = 2; |
| | | } |
| | | |
| | | if ((!attack) && (this.curActionState != 1)) |
| | | { |
| | | currentTowerLevel.SetTowerMonsterMat(materialTowerWaitSelf); |
| | | currentTowerLevel.SetTowerMonsterMat(materialTowerWaitSelf, false); |
| | | this.curActionState = 1; |
| | | } |
| | | } |
| | |
| | | if (value) |
| | | { |
| | | if (opponentSide) |
| | | currentTowerLevel.SetTowerMonsterMat(materialTowerWaitOppo); |
| | | currentTowerLevel.SetTowerMonsterMat(materialTowerWaitOppo, false); |
| | | else |
| | | currentTowerLevel.SetTowerMonsterMat(materialTowerWaitSelf); |
| | | currentTowerLevel.SetTowerMonsterMat(materialTowerWaitSelf, false); |
| | | |
| | | // 处理Tower |
| | | this.setTowerState(false); |
| | |
| | | // 初始化当前的局内Tower等级数据 |
| | | this.initInSceneTowerLevel(SceneTowerLvl.getInSceneTowerLvl(this.towerName)); |
| | | |
| | | StartCoroutine(ResetScale()); |
| | | } |
| | | |
| | | IEnumerator ResetScale(){ |
| | | yield return new WaitForSeconds(0.2f); |
| | | if (gridPosition.y > 1) |
| | | { |
| | | currentTowerLevel.ResetScale(); |
| | | }else{ |
| | | } |
| | | else |
| | | { |
| | | currentTowerLevel.NormalScale(); |
| | | } |
| | | } |