public void DecreaseRage(float decrease) { decrease = Mathf.Clamp(decrease, 0, maxRage); currentRage -= decrease; OnRageChanged?.Invoke(maxRage, currentRage); resetRageTimer(); }
/* [Rage Methods] */ public void IncreaseRage(float increase) { //increase = Mathf.Clamp(increase, 0, maxRage); currentRage = Mathf.Clamp(currentRage + increase, 0, maxRage); OnRageChanged?.Invoke(maxRage, currentRage); resetRageTimer(); if (currentRage == maxRage) { InvokeEnrage?.Invoke(true); } //Debug.Log("Current Rage: " + currentRage); }
private void RageDecay() { currentRage = (float)Mathf.Clamp(currentRage - (rageDecayRate.GetValue() * Time.deltaTime), 0.0f, maxRage); OnRageChanged?.Invoke(maxRage, currentRage); }