Adventure Creator  1.66.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2018
AC.FollowTintMap Class Reference
Inheritance diagram for AC.FollowTintMap:

Public Member Functions

void AfterLoad ()
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

Detailed Description

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.

Member Function Documentation

◆ AfterLoad()

void AC.FollowTintMap.AfterLoad ( )

Called after a scene change.

◆ LoadData()

void AC.FollowTintMap.LoadData ( VisibilityData  data)

Updates its own variables from a VisibilityData class.

dataThe VisibilityData class to load from

◆ ResetTintMap()

void AC.FollowTintMap.ResetTintMap ( )

Assigns the internal TintMap to follow based on the chosen public variables.

◆ SaveData()

VisibilityData AC.FollowTintMap.SaveData ( VisibilityData  visibilityData)

Updates a VisibilityData class with its own variables that need saving.

visibilityDataThe original VisibilityData class
The updated VisibilityData class

◆ SetIntensity()

void AC.FollowTintMap.SetIntensity ( float  _targetIntensity,
float  _fadeTime = 0f 

Changes the intensity of a TintMap's effect.

_targetIntensityThe new intensity value
_fadeTimeThe duration, in seconds, to change the intensity over. If = 0, the change will be instantaneous.

Member Data Documentation

◆ affectChildren

bool AC.FollowTintMap.affectChildren = false

If True, then SpriteRenderer components found elsewhere in the object's hierarchy will also be affected

◆ intensity

float AC.FollowTintMap.intensity = 1f

How intense the colour-tiniting effect is. 0 = no effect, 1 = fully tinted

◆ tintMap

TintMap AC.FollowTintMap.tintMap

The TintMap to make use of, if useDefaultTintMap = False

◆ useDefaultTintMap

bool AC.FollowTintMap.useDefaultTintMap = true

If True, then the tintMap defined in SceneSettings will be used as this sprite's colour tinter.