public void SpendActionEnergy() { currentActionEnergy -= 100; OnActionEnergyChanged?.Invoke(this, new OnActionEnergyChangedEventArgs { newActionEnergy = (int)(currentActionEnergy - (CurrentActionPoints * 100)), newActionPoints = CurrentActionPoints }); }
public void AddActionEnergy(float amount) { currentActionEnergy += amount; currentActionEnergy = Mathf.Clamp(currentActionEnergy, 0, MaxActionEnergy); OnActionEnergyChanged?.Invoke(this, new OnActionEnergyChangedEventArgs { newActionEnergy = (int)(currentActionEnergy - (CurrentActionPoints * 100)), newActionPoints = CurrentActionPoints }); }