Methods
CheckTimer()
Recalculate the interval and update the timer accordingly.
ComputeRates() → {boolean}
Returns:
- Whether this entity has at least one non-zero amount of resources to pay.
- Type
- boolean
GetInterval() → {number}
Returns:
- The interval between resource subtractions, in ms.
- Type
- number
GetRates() → {Object}
Returns:
- The upkeep rates in the form of { "resourceName": {number} }.
- Type
- Object
HandleInsufficientUpkeep()
E.g. take a hitpoint, reduce CP.
HandleSufficientUpkeep()
Reset to the previous stage.
Pay()
Try to subtract the needed resources.
Data and lateness are unused.