Adventure Creator
1.79.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
|
Public Member Functions | |
void | ResetTintMap () |
void | SetIntensity (float _targetIntensity, float _fadeTime=0f) |
Changes the intensity of a TintMap's effect. More... | |
VisibilityData | SaveData (VisibilityData visibilityData) |
Updates a VisibilityData class with its own variables that need saving. More... | |
void | LoadData (VisibilityData data) |
Updates its own variables from a VisibilityData class. More... | |
Public Attributes | |
bool | useDefaultTintMap = true |
TintMap | tintMap |
float | intensity = 1f |
bool | affectChildren = false |
Protected Member Functions | |
void | Awake () |
void | OnEnable () |
void | OnDisable () |
void | LateUpdate () |
Protected Attributes | |
TintMap | actualTintMap |
SpriteRenderer | _spriteRenderer |
SpriteRenderer[] | _spriteRenderers |
float | targetIntensity |
float | initialIntensity |
float | fadeStartTime |
float | fadeTime |
Attach this script to a GameObject to affect the colour values of its SpriteRenderer component, according to a TintMap. This is intended for 2D character sprites, to provide lighting effects when moving around a scene.
void AC.FollowTintMap.LoadData | ( | VisibilityData | data | ) |
Updates its own variables from a VisibilityData class.
data | The VisibilityData class to load from |
void AC.FollowTintMap.ResetTintMap | ( | ) |
Assigns the internal TintMap to follow based on the chosen public variables.
VisibilityData AC.FollowTintMap.SaveData | ( | VisibilityData | visibilityData | ) |
Updates a VisibilityData class with its own variables that need saving.
visibilityData | The original VisibilityData class |
void AC.FollowTintMap.SetIntensity | ( | float | _targetIntensity, |
float | _fadeTime = 0f |
||
) |
Changes the intensity of a TintMap's effect.
_targetIntensity | The new intensity value |
_fadeTime | The duration, in seconds, to change the intensity over. If = 0, the change will be instantaneous. |
bool AC.FollowTintMap.affectChildren = false |
If True, then SpriteRenderer components found elsewhere in the object's hierarchy will also be affected
float AC.FollowTintMap.intensity = 1f |
How intense the colour-tiniting effect is. 0 = no effect, 1 = fully tinted
bool AC.FollowTintMap.useDefaultTintMap = true |
If True, then the tintMap defined in SceneSettings will be used as this sprite's colour tinter.