| | |
| | | } |
| | | |
| | | TowerLevel myTower; |
| | | |
| | | bool fireState = false; |
| | | protected void updateTowerSkillData() |
| | | { |
| | | // |
| | |
| | | towerPtr.energyCtl.SetEnergyProcessFloat(process); |
| | | if (proint == 10) |
| | | { |
| | | fireState = true; |
| | | fInEnergy = 5.0f; |
| | | myTower.SetFireMatSpeed(true);//设置了火宝石快速攻击 |
| | | // 设置多倍攻击速度 |
| | |
| | | { |
| | | myTower.SetFireMatSpeed(false);//恢复了火宝石攻击速度 |
| | | |
| | | fireState = false; |
| | | EventCenter.Ins.BroadCast((int)KTGMGemClient.EventType.FireTowerChargeEnd); |
| | | fInEnergy = 0.0f; |
| | | this.energyCalTime = 0.0f; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// This function is called when the object becomes enabled and active. |
| | | /// </summary> |
| | | void OnEnable() |
| | | { |
| | | if (towerPtr && towerPtr.energyCtl) |
| | | { |
| | | if (fireState) |
| | | { |
| | | myTower.SetFireMatSpeed(true);//设置了火宝石快速攻击 |
| | | |
| | | towerPtr.PlayEnergyEffect(true); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// This function is called when the behaviour becomes disabled or inactive. |
| | | /// </summary> |
| | | void OnDisable() |
| | | { |
| | | if (towerPtr && towerPtr.energyCtl) |
| | | { |
| | | towerPtr.PlayEnergyEffect(false, false); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Update the timers |
| | | /// </summary> |
| | | protected virtual void Update() |