Third Person Cover Shooter
1.6
|
Maintains character health. More...
Public Member Functions | |
void | OnStop () |
Character stops. More... | |
void | OnWalk () |
Character is no longer running, stop stamina consumption. More... | |
void | OnRun () |
Character is running, set frame by frame stamina consumption to RunCost. More... | |
void | OnSprint () |
Character is sprinting, set frame by frame stamina consumption to SprintCost. More... | |
void | OnDead () |
Catch the death event and stop stamina regeneration. More... | |
void | OnResurrect () |
Catch the resurrection and set the state as 'not dead', enabling stamina regeneration. More... | |
bool | Take (float amount) |
Reduce stamina by the given amount. More... | |
Public Attributes | |
float | Stamina = 100f |
Current health of the character. More... | |
float | MaxStamina = 100f |
Max health to regenerate to. More... | |
float | Regeneration = 30f |
Amount of health regenerated per second. More... | |
float | RunCost = 20 |
Stamina consumed per second while running. More... | |
float | RunTrigger = 20 |
Stamina that has to be regenerated before the ability to run returns. More... | |
float | SprintCost = 50 |
Stamina consumed per second while running. More... | |
float | SprintTrigger = 50 |
Stamina that has to be regenerated before the ability to sprint returns. More... | |
Maintains character health.
void CoverShooter.CharacterStamina.OnDead | ( | ) |
Catch the death event and stop stamina regeneration.
Implements CoverShooter.ICharacterHealthListener.
void CoverShooter.CharacterStamina.OnResurrect | ( | ) |
Catch the resurrection and set the state as 'not dead', enabling stamina regeneration.
Implements CoverShooter.ICharacterHealthListener.
void CoverShooter.CharacterStamina.OnRun | ( | ) |
Character is running, set frame by frame stamina consumption to RunCost.
Implements CoverShooter.ICharacterWalkListener.
void CoverShooter.CharacterStamina.OnSprint | ( | ) |
Character is sprinting, set frame by frame stamina consumption to SprintCost.
Implements CoverShooter.ICharacterWalkListener.
void CoverShooter.CharacterStamina.OnStop | ( | ) |
Character stops.
Implements CoverShooter.ICharacterWalkListener.
void CoverShooter.CharacterStamina.OnWalk | ( | ) |
Character is no longer running, stop stamina consumption.
Implements CoverShooter.ICharacterWalkListener.
bool CoverShooter.CharacterStamina.Take | ( | float | amount | ) |
Reduce stamina by the given amount.
If the reduction was possible, return true, signaling that an action can be performed.
float CoverShooter.CharacterStamina.MaxStamina = 100f |
Max health to regenerate to.
float CoverShooter.CharacterStamina.Regeneration = 30f |
Amount of health regenerated per second.
float CoverShooter.CharacterStamina.RunCost = 20 |
Stamina consumed per second while running.
float CoverShooter.CharacterStamina.RunTrigger = 20 |
Stamina that has to be regenerated before the ability to run returns.
float CoverShooter.CharacterStamina.SprintCost = 50 |
Stamina consumed per second while running.
float CoverShooter.CharacterStamina.SprintTrigger = 50 |
Stamina that has to be regenerated before the ability to sprint returns.
float CoverShooter.CharacterStamina.Stamina = 100f |
Current health of the character.