PlayerHealthVisualEffectsSettings
A class in Root.Township, the global namespace.
Asset with the local player's health effects: hurt vignette, saturation by health, hunger blur and stomach sounds, recent damage, and the nightmare fog effect.
- Listed in Global namespace: P
- Inherits or implements
ScriptableObject - Nested types
NightmareEffectController
Constructors
| Member | What it is |
|---|---|
PlayerHealthVisualEffectsSettings() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
19 private and internal fields
| Member | What it is |
|---|---|
private float blurryDelay | Backing field for BlurryDelay. Shown only when isBlurringOnRepeat is on. |
private DurationCurve blurryEffect | Backing field for BlurryEffect. |
private float chanceOfStomachAudio | Backing field for ChanceOfStomachAudio. Shown only when isBlurringOnRepeat is on. |
private float deadSaturation | Backing field for DeadSaturation. |
private AnimationCurve fogDensityOverValue | Curve from the nightmare stat's value to fog density. |
private HungerStat hungerDefinition | Backing field for HungerDefinition. |
private ShellSetting hurtShell | Backing field for HurtShell. |
private DurationCurve hurtShellCurve | Backing field for HurtShellCurve. |
private bool isBlurringOnRepeat | Backing field for IsBlurringOnRepeat. |
private int maxHungerLevelBeforeBlur | Backing field for MaxHungerLevelBeforeBlur. |
private PlayerHealthVisualEffectsSettings.NightmareEffectController nightmareEffectController | The nightmare effect controller, made on the first SetupNightmare call. |
private PooledObjectDefinition nightmareEffectDefinition | Pooled particle effect spawned at the player's feet during a nightmare. |
private StatDefinition nightmareStatDefinition | The stat that drives the nightmare effect. |
private float recentDamageCooldown | Backing field for RecentDamageCooldown. |
private StatDefinition recentDamageDefinition | Backing field for RecentDamageDefinition. |
private int repeatStartsOnLevel | Backing field for RepeatStartsOnLevel. Shown only when isBlurringOnRepeat is on. |
private AnimationCurve saturationCurve | Backing field for SaturationCurve. |
private DurationCurve vignetteDurationCurve | Backing field for VignetteDurationCurve. |
private float visionLerpSpeed | Backing field for VisionLerpSpeed. |
Properties
| Member | What it is |
|---|---|
float BlurryDelay { get; } | Seconds between repeated hunger blurs. |
DurationCurve BlurryEffect { get; } | Curve and length of one hunger blur. |
float ChanceOfStomachAudio { get; } | Chance of a stomach rumble with each blur. |
float DeadSaturation { get; } | Screen saturation while dead. |
HungerStat HungerDefinition { get; } | The hunger stat, used to get the hunger level. |
ShellSetting HurtShell { get; } | Shell setting for the hurt effect. |
DurationCurve HurtShellCurve { get; } | Curve and length of the hurt shell effect. |
bool IsBlurringOnRepeat { get; } | Whether the hunger blur repeats at low hunger levels. |
int MaxHungerLevelBeforeBlur { get; } | Hunger levels at or above this don't blur. |
float RecentDamageCooldown { get; } | Seconds the recent damage stat stays on after damage. |
StatDefinition RecentDamageDefinition { get; } | The stat set to 1 while the player was recently damaged. |
int RepeatStartsOnLevel { get; } | Hunger level at or below which the blur repeats. |
AnimationCurve SaturationCurve { get; } | Curve from health to screen saturation. |
DurationCurve VignetteDurationCurve { get; } | Curve and length of the hurt vignette. |
float VisionLerpSpeed { get; } | How fast saturation changes. |
Methods
| Member | What it is |
|---|---|
void SetupNightmare(StatManager manager) | Starts watching the nightmare stat to show its particles and fog. |
Used in
Members of other types that take, return or hold a PlayerHealthVisualEffectsSettings: