| | |
| | | using ActionGameFramework.Health; |
| | | using Core.Utilities; |
| | | using UnityEngine; |
| | | using TowerDefense.Towers.Projectiles; |
| | | |
| | | namespace TowerDefense.Towers.TowerLaunchers |
| | | { |
| | |
| | | int currentFiringPointIndex = 0; |
| | | int firingPointLength = firingPoints.Length; |
| | | count = count > maxAttack ? maxAttack : count; |
| | | |
| | | for (int i = 0; i < count; i++) |
| | | { |
| | | Targetable enemy = enemies[i]; |
| | |
| | | return; |
| | | } |
| | | |
| | | // |
| | | // 此处设置局内升级数据对应的攻击数据: |
| | | Damager tm = poolable.gameObject.GetComponent<Damager>(); |
| | | if (tm) |
| | | { |
| | | tm.IsEnhancedBullet = attack.GetComponent<Damager>().IsEnhancedBullet; |
| | | Damager srctm = attack.GetComponent<Damager>(); |
| | | tm.inSceneUpGradeDamage = srctm.inSceneUpGradeDamage; |
| | | tm.doubleHit = srctm.doubleHit; |
| | | BallisticAttack ballisticAttack = poolable.gameObject.GetComponent<BallisticAttack>(); |
| | | ballisticAttack.TowerPtr = attack.GetComponent<Damager>().TowerPtr; |
| | | |
| | | // |
| | | // 最后一颗子弹的多倍伤害. |
| | | tm.damageMulti = srctm.damageMulti; |
| | | srctm.damageMulti = 1.0f; |
| | | //Debug.Log("源始局内升级数据是:" + srctm.inSceneUpGradeDamage); |
| | | } |
| | | // WORK START: 从 Pool 内获取数据的时候,就把原来的数据清除掉了. |
| | | Launch(enemy, poolable.gameObject, firingPoints[0]); //GetRandomTransform(firingPoints)); |