| | |
| | | /// </summary> |
| | | public Material materialTowerAttackSelf; |
| | | public Material materialTowerWaitSelf; |
| | | public Material materialTowerAttackOppo; |
| | | public Material materialTowerWaitOppo; |
| | | |
| | | /// <summary> |
| | | /// 0 空状态 1 等待状态 2 攻击状态. |
| | |
| | | { |
| | | if (!materialTowerAttackSelf) return; |
| | | |
| | | if (attack && (this.curActionState != 2)) |
| | | if( opponentSide) |
| | | { |
| | | currentTowerLevel.SetTowerMonsterMat(materialTowerAttackSelf); |
| | | this.curActionState = 2; |
| | | } |
| | | if (attack && (this.curActionState != 2)) |
| | | { |
| | | currentTowerLevel.SetTowerMonsterMat(materialTowerAttackOppo); |
| | | this.curActionState = 2; |
| | | } |
| | | |
| | | if ((!attack) && (this.curActionState != 1)) |
| | | if ((!attack) && (this.curActionState != 1)) |
| | | { |
| | | currentTowerLevel.SetTowerMonsterMat( materialTowerWaitOppo ); |
| | | this.curActionState = 1; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | currentTowerLevel.SetTowerMonsterMat(materialTowerWaitSelf); |
| | | this.curActionState = 1; |
| | | if (attack && (this.curActionState != 2)) |
| | | { |
| | | currentTowerLevel.SetTowerMonsterMat(materialTowerAttackSelf); |
| | | this.curActionState = 2; |
| | | } |
| | | |
| | | if ((!attack) && (this.curActionState != 1)) |
| | | { |
| | | currentTowerLevel.SetTowerMonsterMat(materialTowerWaitSelf); |
| | | this.curActionState = 1; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | if (opponentSide) |
| | | currentTowerLevel.SetTowerMonsterMat(materialMonsterOppo); |
| | | else |
| | | { |
| | | currentTowerLevel.SetTowerMonsterMat(materialMonsterSelf); |
| | | this.setTowerState(false); |
| | | } |
| | | |
| | | |
| | | // 处理Tower |
| | | this.setTowerState(false); |
| | | |
| | | |
| | | if (opponentSide) |
| | | { |
| | |
| | | |
| | | // |
| | | // 根据是否是子弹塔防来决定是否显示相应的界面 |
| | | if (this.eTowerFuntion == ETowerFuntion.BULLET) |
| | | BulletUICtl buc = this.placementArea.GetBulletUICtl(gridPosition.x); |
| | | /* |
| | | if ( (this.eTowerFuntion == ETowerFuntion.BULLET) && (buc != null ) ) |
| | | { |
| | | BulletUICtl buc = this.placementArea.GetBulletUICtl(gridPosition.x); |
| | | /* |
| | | if (buc) |
| | | { |
| | | buc.gameObject.SetActive(true); |
| | | this.bulletCtl = buc; |
| | | buc.resetToMaxBullet(); |
| | | }*/ |
| | | // 设置数据 |
| | | buc.gameObject.SetActive(true); |
| | | this.bulletCtl = buc; |
| | | buc.resetToMaxBullet(); |
| | | } |
| | | else |
| | | { |
| | | // 清空数据 |
| | | buc.gameObject.SetActive(false); |
| | | this.bulletCtl = null; |
| | | }*/ |
| | | } |
| | | |
| | | } |