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

Public Member Functions

float GetHighlightIntensity ()
 Gets the intended intensity of the highlighting effect at the current point in time. More...
 
float GetHighlightAlpha ()
 Gets the highlight effect's intensity, as an alpha value for associated icon textures. More...
 
void SetMinHighlight (float _minHighlight)
 Sets the minimum intensity of the highlighting effect - i.e. the intensity when the effect is considered "off". More...
 
void HighlightOn ()
 
void HighlightOnInstant ()
 
void HighlightOff ()
 
void HighlightOffInstant ()
 
void Flash ()
 
float GetFlashTime ()
 Gets the duration of the flash (i.e. turn on, then off) effect. More...
 
float GetFlashAlpha (float original)
 Gets the flash effect's intensity, as an alpha value for associated icon textures. More...
 
float GetFadeTime ()
 Gets the time that it will take to turn the highlight effect fully on or fully off. More...
 
void Pulse ()
 
void _Update ()
 

Public Attributes

bool highlightWhenSelected = true
 
bool brightenMaterials = true
 
bool affectChildren = true
 
float maxHighlight = 2f
 
float fadeTime = 0.3f
 
float flashHoldTime = 0f
 
bool callEvents
 
UnityEvent onHighlightOn
 
UnityEvent onHighlightOff
 

Detailed Description

Allows GameObjects associated with Hotspots to glow when the Hotspots are made active. Attach it to a mesh renderer, and assign it as the Hotspot's highlight variable.

Member Function Documentation

◆ _Update()

void AC.Highlight._Update ( )

Re-calculates the intensity value. This is public so that it can be called every frame by the StateHandler component.

◆ Flash()

void AC.Highlight.Flash ( )

Flashes the highlight effect on, and then off, once.

◆ GetFadeTime()

float AC.Highlight.GetFadeTime ( )

Gets the time that it will take to turn the highlight effect fully on or fully off.

Returns
The time, in seconds, that it takes to turn the highlight effect fully on or fully off

◆ GetFlashAlpha()

float AC.Highlight.GetFlashAlpha ( float  original)

Gets the flash effect's intensity, as an alpha value for associated icon textures.

Parameters
originalThe original alpha value of the texture this is being called for
Returns
The flash effect's intensity, as an alpha value

◆ GetFlashTime()

float AC.Highlight.GetFlashTime ( )

Gets the duration of the flash (i.e. turn on, then off) effect.

Returns
The duration, in effect, that the flash effect will last

◆ GetHighlightAlpha()

float AC.Highlight.GetHighlightAlpha ( )

Gets the highlight effect's intensity, as an alpha value for associated icon textures.

Returns
The alpha value of the highlight effect

◆ GetHighlightIntensity()

float AC.Highlight.GetHighlightIntensity ( )

Gets the intended intensity of the highlighting effect at the current point in time.

Returns
The intended intensity of the highlight, ranging from 0 to 1.

◆ HighlightOff()

void AC.Highlight.HighlightOff ( )

Turns the highlight effect off. The effect will occur over time.

◆ HighlightOffInstant()

void AC.Highlight.HighlightOffInstant ( )

Instantly turns the highlight effect off.

◆ HighlightOn()

void AC.Highlight.HighlightOn ( )

Turns the highlight effect on. The effect will occur over time.

◆ HighlightOnInstant()

void AC.Highlight.HighlightOnInstant ( )

Instantly turns the highlight effect on, to its maximum intensity.

◆ Pulse()

void AC.Highlight.Pulse ( )

Pulses the highlight effect on, and then off, in a continuous cycle.

◆ SetMinHighlight()

void AC.Highlight.SetMinHighlight ( float  _minHighlight)

Sets the minimum intensity of the highlighting effect - i.e. the intensity when the effect is considered "off".

Parameters
_minHighlightThe minimum intensity of the highlighting effect

Member Data Documentation

◆ affectChildren

bool AC.Highlight.affectChildren = true

If True, then child Renderer GameObjects will be brightened as well

◆ brightenMaterials

bool AC.Highlight.brightenMaterials = true

If True, then Materials associated with the GameObject's Renderer will be affected. Otherwise, their intended values will be calculated, but not applied, allowing for custom effects to be achieved.

◆ callEvents

bool AC.Highlight.callEvents

If True, then custom events can be called when highlighting the object

◆ fadeTime

float AC.Highlight.fadeTime = 0.3f

The fade time for the highlight transition effect

◆ flashHoldTime

float AC.Highlight.flashHoldTime = 0f

The length of time that a flash will hold for

◆ highlightWhenSelected

bool AC.Highlight.highlightWhenSelected = true

If True, then the Highlight effect will be enabled automatically when the Hotspot is selected

◆ maxHighlight

float AC.Highlight.maxHighlight = 2f

The maximum highlight intensity (1 = no effect)

◆ onHighlightOff

UnityEvent AC.Highlight.onHighlightOff

The UnityEvent to run when the highlight effect is disabled

◆ onHighlightOn

UnityEvent AC.Highlight.onHighlightOn

The UnityEvent to run when the highlight effect is enabled