Vitals Utility
Vitals Utility is a static class that provides extra functionality to help you make the most out of the Vitals System.
Public Methods
| Method | Parameters | Usage |
|---|---|---|
| GetPercentage | VitalsBase - Vitals Component | Returns the percentage of the current value in relation to the max value of the Vitals Component |
| GetPercentage | float - Valuefloat - Max Value | Returns the percentage of value in relation to the max value |
| IncreaseByPercentage | VitalsBase - Vitals Componentfloat - Percentage | Percentage is a value between 0 and 1 (0.1 = 10%). Increases the value of the Vitals Component by the given percentage |
| DecreaseByPercentage | VitalsBase - Vitals Componentfloat - Percentage | Percentage is a value between 0 and 1 (0.1 = 10%). Decreases the value of the Vitals Component by the given percentage |
| IncreaseMaxByPercentage | VitalsBase - Vitals Componentfloat - Percentage | Percentage is a value between 0 and 1 (0.1 = 10%) Increases the max value of the Vitals Component by the given percentage |
| DecreaseMaxByPercentage | VitalsBase - Vitals Componentfloat - Percentage | Percentage is a value between 0 and 1 (0.1 = 10%) Decreases the max value of the Vitals Component by the given percentage |
| DrainAtRateForTime | VitalsBase - Vitals Componentfloat - Drain Ratefloat - Time | Drains the Vitals Component at the given drain rate for the given time |
| RegenerateAtRateForTime | VitalsBase - Vitals Componentfloat - Regeneration Ratefloat - Time | Regenerates the Vitals Component at the given regeneration rate for the given time |
| IsFull | VitalsBase - Vitals Component | Returns true if the Vitals Component's current value equals the maximum value, and false if it is not |
| IsEmpty | VitalsBase - Vitals Component | Returns true if the Vitals Component's value is zero, and false if it is not |
| Bind | VitalsBase - Vitals ComponentVitalsUIBind - Vitals UI Bind Component | Binds the value of the Vitals Component to the UI Bind component at runtime |