Beispiel #1
0
 public void SetEnergy(float energy, eSetEnergyType type, UnitCtrl source)
 {
     //log
     energy = Mathf.Min(Mathf.Max(0, energy), BattleDefine.MAX_ENERGY);
     Energy = energy;
     if (unitUI != null)
     {
         unitUI.SetTP(energy / BattleDefine.MAX_ENERGY);
     }
     EnergyChange?.Invoke(this);
 }
Beispiel #2
0
 private void ChargeEnergy(eSetEnergyType setEnergyType, float energy, bool hasEffect, UnitCtrl source, bool hasNumberEffect, bool isEffectTypeCommon, bool useRecoveryRate, bool isRegenerate)
 {
     if (!IsAbnormalState(eAbnormalState.TP_REGENERATION) || setEnergyType != eSetEnergyType.BY_ATK && setEnergyType != eSetEnergyType.KILL_BONUS)
     {
         if (energy > 0 && useRecoveryRate)
         {
             energy *= (100.0f + GetEnergyRecoveryRateZero()) / 100.0f;
         }
         SetEnergy(energy + Energy, setEnergyType, source);
         //加能量特效
         string word = UnitName + "通过" + setEnergyType.GetDescription() + (energy >= 0 ? "增加<color=#3791FF>" : "减少<color=#3791FF>") + Mathf.Abs(energy) + "</color>点能量";
         BattleUIManager.Instance.LogMessage(word, eLogMessageType.CHANGE_TP, IsOther);
     }
 }
Beispiel #3
0
 private void ChargeEnergy(eSetEnergyType setEnergyType, float energy, bool hasEffect, UnitCtrl source, bool hasNumberEffect, bool isEffectTypeCommon, bool useRecoveryRate, bool isRegenerate)
 {
 }