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

Public Member Functions

Color GetColorData (Vector2 position, float intensity=1f, float alpha=1f)
 Gets the colour tint at a specific position in the scene. More...

Public Attributes

Texture2D tintMapTexture
Color colorModifier = Color.white
bool disableRenderer = true

Detailed Description

This script is used to change the colour tinting of 2D character sprites, based on their position in the scene. The instance of this class stored in SceneSettings' tintMap variable can be read by FollowTintMap components to determine what their SpriteRenderer's colour should be.

Member Function Documentation

◆ GetColorData()

Color AC.TintMap.GetColorData ( Vector2  position,
float  intensity = 1f,
float  alpha = 1f 

Gets the colour tint at a specific position in the scene.

positionThe 2D position in the scene to get the colour tint at
intensityThe intensity of the effect, where 0 = fully white, 1 = fully tinted
alphaThe alpha value to give the final Color
The colour tint. If no appropriate texture is found, Color.white will be returned

Member Data Documentation

◆ colorModifier

Color AC.TintMap.colorModifier = Color.white

A Color to multiply the textured color by

◆ disableRenderer

bool AC.TintMap.disableRenderer = true

If True, then the MeshRenderer component will be disabled automatically when the game begins

◆ tintMapTexture

Texture2D AC.TintMap.tintMapTexture

An optional texture to make use of. If this field is null, then the texture found on the attached MeshRenderer's material will be used instead