Adventure Creator
1.79.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
|
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 |
Protected Member Functions | |
void | Awake () |
void | AssignTexture (Texture2D newTexture=null) |
Protected Attributes | |
Texture2D | actualTexture |
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.
Color AC.TintMap.GetColorData | ( | Vector2 | position, |
float | intensity = 1f , |
||
float | alpha = 1f |
||
) |
Gets the colour tint at a specific position in the scene.
position | The 2D position in the scene to get the colour tint at |
intensity | The intensity of the effect, where 0 = no effect, 1 = fully tinted |
alpha | The alpha value to give the final Color |
Color AC.TintMap.colorModifier = Color.white |
A Color to multiply the textured color by
bool AC.TintMap.disableRenderer = true |
If True, then the MeshRenderer component will be disabled automatically when the game begins
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