Public classes
LowHealthController |
LowHealthController
Main class of Low Health effects. Fields
Methods
Fields public bool colorLossEnabled Color loss enabled or disabled. public bool detailLossEnabled Detail loss enabled or disabled. public bool doubleVisionEnabled Double vision enabled or disabled. public bool showInEditor Set effects visible in editor. This value is used by Unity inspector and there's no need to access this value from code. public bool stopEffectsWhenZeroHealth Stop any moving effects when player health is 0. public bool visionLossEnabled Vision loss enabled or disabled. public float colorLossStartsAt Health level (from 0 to 1) where color loss effect starts. public float colorLossTowardRedStartsAt Health level (from 0 to 1) where screen starts to turn red instead of gray. 0 to disable effect. Setting this value equal or higher than 'colorLossStartsAt' makes color loss to turn red instead of gray from very beginning. public float detailLossMaxEffect Detail loss effect maximum amount when player health is 0. public float detailLossStartsAt Health level (from 0 to 1) where detail loss effect starts. public float doubleVisionMaxEffect Double vision effect maximum amount when player health is 0. public float doubleVisionStartsAt Health level (from 0 to 1) where double vision effect starts. public float doubleVisionWaving Additional waving effect to make double vision less static. 0 to disable effect, 1 for maximum effect. public float simulateHealth Simulated player health in editor. This value is used by Unity inspector and there's no need to access this value from code. public float visionLossHeartBeat Additional heartbeat effect. 0 to disable effect, 1 for maximum effect. public float visionLossMaxEffect Vision loss effect maximum amount when player health is 0. public float visionLossStartsAt Health level (from 0 to 1) where vision loss effect starts. Methods public void ResetToDefaultValues () Reset all fields in this class to their default values. Typically this is used only internally by Unity inspector. public void SetPlayerHealthInstantly (float playerHealth) Set player health instantly. Any effect that should be visible with this health, will take place immediately.
public void SetPlayerHealthSmoothly (float playerHealth, float seconds) Set player health smoothly. All the effects will take place relatively slowly, giving nice transition between health states.
public void UpdateShaderProperties () Update shader properties. This is typically called automatically by this script or Unity inspector whenever needed. |