Stamina

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

valueThe amount of stamina the character currently has.
percentThe percentage of stamina to the maximum amount (Read only).
fullWhether the character has full stamina (Read only).
emptyWhether the character has zero stamina (Read only).
regeneratingWhether the character is currently regenerating stamina (Read only).
increasableAllows or disallows the stamina value to be increased.
decreasableAllows or disallows the stamina value to be decreased.
changedA callback invoked when the stamina value changes.

Methods

FillIncreases the character's stamina by a flat amount.
FillPercentIncreases the character's stamina by a percent amount.
FillFullIncreases the character's stamina to the maximum amount.
DrainDecreases the character's stamina by a flat amount.
DrainPercentDecreases the character's stamina by a percent amount.
DrainAllDecreases all of the character's stamina.
HasAmountDetermines if the character has at least the given amount of stamina.
HasPercentDetermines if the character has at least the given percent of stamina.
HasRequiredDetermines if there is enough stamina to perform a given action.
Inherited

Properties

settingsThe settings for the behavior.
enabledEnables or disables the behavior from being updated.
controllerThe movement controller handling the process.
registeredWhether the process has been registered to a controller.
orderDetermines the order in which processes are handled. The process with the lowest order value is handled first.
idThe unique identifier of the movement process.