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

Public Member Functions

void SetAlpha (float _alpha)
 Forces the alpha value of a sprite to a specific value. More...
 
void Fade (FadeType _fadeType, float _fadeTime, float startAlpha=-1)
 Fades the Sprite attached to this GameObject in or out. More...
 
void EndFade ()
 

Public Attributes

bool affectChildren = false
 
bool isFading = true
 
float fadeStartTime
 
float fadeTime
 
FadeType fadeType
 

Detailed Description

Provides functions that can fade a sprite in and out.

Member Function Documentation

◆ EndFade()

void AC.SpriteFader.EndFade ( )

Ends the sprite-fading effect, and sets the Sprite's alpha to its target value.

◆ Fade()

void AC.SpriteFader.Fade ( FadeType  _fadeType,
float  _fadeTime,
float  startAlpha = -1 
)

Fades the Sprite attached to this GameObject in or out.

Parameters
_fadeTypeThe direction of the fade effect (fadeIn, fadeOut)
_fadeTimeThe duration, in seconds, of the fade effect
startAlphaThe alpha value that the Sprite should have when the effect begins. If <0, the Sprite's original alpha will be used.

◆ SetAlpha()

void AC.SpriteFader.SetAlpha ( float  _alpha)

Forces the alpha value of a sprite to a specific value.

Parameters
_alphaThe alpha value to assign the sprite attached to this GameObject

Member Data Documentation

◆ affectChildren

bool AC.SpriteFader.affectChildren = false

If True, then child Sprite will also be affected

◆ fadeStartTime

float AC.SpriteFader.fadeStartTime

The time at which the sprite began fading

◆ fadeTime

float AC.SpriteFader.fadeTime

The duration of the sprite-fading effect

◆ fadeType

FadeType AC.SpriteFader.fadeType

The direction of the sprite-fading effect (fadeIn, fadeOut)

◆ isFading

bool AC.SpriteFader.isFading = true

True if the Sprite attached to the GameObject this script is attached to is currently fading