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