Adventure Creator
1.79.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
|
Public Member Functions | |
void | SetAlpha (float _alpha) |
Forces the alpha value of a sprite to a specific value. More... | |
float | GetAlpha () |
Gets the alpha value of the SpriteRenderer, which in turn is determind by its color 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 |
float | minAlpha = 0f |
float | maxAlpha = 1f |
Protected Attributes | |
SpriteRenderer | spriteRenderer |
SpriteRenderer[] | childSprites |
Properties | |
bool | IsFading [get] |
float | FadeStartTime [get] |
float | FadeTime [get] |
FadeType | FadeType [get] |
Provides functions that can fade a sprite in and out.
void AC.SpriteFader.EndFade | ( | ) |
Ends the sprite-fading effect, and sets the Sprite's alpha to its target value.
void AC.SpriteFader.Fade | ( | FadeType | _fadeType, |
float | _fadeTime, | ||
float | startAlpha = -1 |
||
) |
Fades the Sprite attached to this GameObject in or out.
_fadeType | The direction of the fade effect (fadeIn, fadeOut) |
_fadeTime | The duration, in seconds, of the fade effect |
startAlpha | The alpha value that the Sprite should have when the effect begins. If <0, the Sprite's original alpha will be used. |
float AC.SpriteFader.GetAlpha | ( | ) |
Gets the alpha value of the SpriteRenderer, which in turn is determind by its color
void AC.SpriteFader.SetAlpha | ( | float | _alpha | ) |
Forces the alpha value of a sprite to a specific value.
_alpha | The alpha value to assign the sprite attached to this GameObject |
bool AC.SpriteFader.affectChildren = false |
If True, then child Sprite will also be affected
|
get |
The time at which the sprite began fading
|
get |
The duration of the sprite-fading effect
|
get |
The direction of the sprite-fading effect (fadeIn, fadeOut)
|
get |
True if the Sprite attached to the GameObject this script is attached to is currently fading