Public classes

LowHealthController
LowHealthDirectAccess


Introduction page

LowHealthDirectAccess
Derived from MonoBehaviour


This class provides direct access to Low Health (shader) effects.

Attach this script to the camera where you want low health effects to be displayed and then use provided methods in this class to set the effects. If you change the fields on this class directly, call UpdateShaderProperties() afterwards to enable any new values.

Note that this class gives just simple, direct control to all low health shader effects. For more automation, you may want to use LowHealthController.


Methods

public void ResetToDefaultValues ()Reset all fields in this class to their default zero values.
public void SetColorLossEffect (float colorLossEffect, float colorLossTowardRed)Set amount of color and contrast loss effect.
public void SetDetailLossEffect (float detailLossEffect)Set amount of detail loss effect.
public void SetDoubleVisionEffect (float doubleVisionEffect)Set amount of double vision effect.
public void SetVisionLossEffect (float visionLossEffect)Set amount of vision loss effect.
public void UpdateShaderProperties ()Update shader properties.

Methods

public void ResetToDefaultValues ()

Reset all fields in this class to their default zero values.


public void SetColorLossEffect (float colorLossEffect, float colorLossTowardRed)

Set amount of color and contrast loss effect.

ParameterscolorAndContrastLossEffectValue between 0 and 1 inclusive.


public void SetDetailLossEffect (float detailLossEffect)

Set amount of detail loss effect.

ParametersdetailLossEffectValue between 0 and 1 inclusive.


public void SetDoubleVisionEffect (float doubleVisionEffect)

Set amount of double vision effect.

ParametersdoubleVisionEffectValue between 0 and 1 inclusive.


public void SetVisionLossEffect (float visionLossEffect)

Set amount of vision loss effect.

ParametersvisionLossEffectValue between 0 and 1 inclusive.


public void UpdateShaderProperties ()

Update shader properties. This is typically called automatically whenever needed.