示例#1
0
 public void OnEnergyChange(string energyId, TbaPopup popup)
 {
     EnergyChange?.Invoke(energyId, popup);
     if (EnergyChange == null)
     {
         popup.ResetEvent.Set();
     }
 }
示例#2
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);
 }