Пример #1
0
 public void SpendActionEnergy()
 {
     currentActionEnergy -= 100;
     OnActionEnergyChanged?.Invoke(this, new OnActionEnergyChangedEventArgs {
         newActionEnergy = (int)(currentActionEnergy - (CurrentActionPoints * 100)), newActionPoints = CurrentActionPoints
     });
 }
Пример #2
0
 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
     });
 }