Esempio n. 1
0
    public void DecreaseRage(float decrease)
    {
        decrease     = Mathf.Clamp(decrease, 0, maxRage);
        currentRage -= decrease;

        OnRageChanged?.Invoke(maxRage, currentRage);
        resetRageTimer();
    }
Esempio n. 2
0
    /* [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);
    }
Esempio n. 3
0
 private void RageDecay()
 {
     currentRage = (float)Mathf.Clamp(currentRage - (rageDecayRate.GetValue() * Time.deltaTime), 0.0f, maxRage);
     OnRageChanged?.Invoke(maxRage, currentRage);
 }