DeadStateSettings
A class in Root.Township, Alta.PlayerStates.
Settings asset for the player's dead state (DeadState): ragdoll feel, the fade and respawn timing, and which stats are reset on death.
- Listed in Players and characters
- Inherits or implements
PlayerStateSettings - Derived types
DeadStateSettings.Create - Nested types
Create
Constructors
| Member | What it is |
|---|---|
DeadStateSettings() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
10 private and internal fields
| Member | What it is |
|---|---|
private DeathAnimationSettings animationSettings | Death animation settings. |
private float deadBodyDrag | Rigidbody drag on the dead body (default 0.5). |
private GameAction diedAction | Game action counted for the player each time they die. |
private float fadeInOutTime | Seconds of fade to black before respawn (default 0.5). |
private ShowNames showNamesAction | ShowNames action run on death. |
private float skirtRotationMultiplier | Multiplier for the rotation given to the body on death (default 1). |
private StatThresholdValue[] statsToModifyOnDeath | Stats set to threshold values on death. |
private StatDefinition[] statsToResetOnDeath | Stats reset on death. |
private float timeToIncreaseFog | Seconds of fog build-up before the respawn wait (default 1). |
private float timeToRespawn | Seconds after the fog before the server starts the respawn fade (default 5). |
Properties
| Member | What it is |
|---|---|
DeathAnimationSettings AnimationSettings { get; } | Death animation settings for the body. |
float DeadBodyDrag { get; } | Rigidbody drag applied to the dead body. Defaults to 0.5. |
GameAction DiedAction { get; } | Game task action counted for the player each time they die. |
float FadeInOutTime { get; } | Seconds for the screen fade to black before respawn. |
ShowNames ShowNamesAction { get; } | Show-names action run when the player dies. |
float SkirtRotationMultiplier { get; } | Scales the spin given to the body when it falls. |
override Type StateType { get; } | Always DeadState. |
StatThresholdValue[] StatsToModifyOnDeath { get; } | Stats moved to set threshold values on death. |
StatDefinition[] StatsToResetOnDeath { get; } | Saved stats reset to their defaults on death. Unsaved and duplicate entries are dropped in the editor. |
float TimeToIncreaseFog { get; } | Seconds the fog closes in after death. The server waits this plus TimeToRespawn before fading. |
float TimeToRespawn { get; } | Extra seconds after the fog before the respawn fade starts. Defaults to 5. |
Methods
1 private and internal method
Used in
Members of other types that take, return or hold a DeadStateSettings: