Stamina
Class in Zigurous.CharacterController
Inherits from MovementBehavior<T>
Declaration
public sealed class Stamina : MovementBehavior<StaminaSettings>
Description
Maintains the character's stamina resource which can be used as a requirement to perform abilities.
Properties
value | The amount of stamina the character currently has. |
percent | The percentage of stamina to the maximum amount (Read only). |
full | Whether the character has full stamina (Read only). |
empty | Whether the character has zero stamina (Read only). |
regenerating | Whether the character is currently regenerating stamina (Read only). |
increasable | Allows or disallows the stamina value to be increased. |
decreasable | Allows or disallows the stamina value to be decreased. |
changed | A callback invoked when the stamina value changes. |
Methods
Fill | Increases the character's stamina by a flat amount. |
FillPercent | Increases the character's stamina by a percent amount. |
FillFull | Increases the character's stamina to the maximum amount. |
Drain | Decreases the character's stamina by a flat amount. |
DrainPercent | Decreases the character's stamina by a percent amount. |
DrainAll | Decreases all of the character's stamina. |
HasAmount | Determines if the character has at least the given amount of stamina. |
HasPercent | Determines if the character has at least the given percent of stamina. |
HasRequired | Determines if there is enough stamina to perform a given action. |
Inherited
Properties
settings | The settings for the behavior. |
enabled | Enables or disables the behavior from being updated. |
controller | The movement controller handling the process. |
registered | Whether the process has been registered to a controller. |
order | Determines the order in which processes are handled. The process with the lowest order value is handled first. |
id | The unique identifier of the movement process. |