Public Member Functions | |
void | FadeToTargetAlpha (float fadeTarget_, float fadeSpeed_=_DEFAULT_FADE_SPEED) |
void | FadeOutFull (float fadeSpeed_=_DEFAULT_FADE_SPEED) |
void | FadeInFull (float fadeSpeed_=_DEFAULT_FADE_SPEED) |
void | ForceVisibilityState (DSVisibilityState forceState_) |
float | GetCurrentAlpha () |
DSVisibilityState | GetVisibilityState () |
bool | FadeActive () |
Properties | |
float | fadeDefault [get, set] |
This script controls the opacity of a card, given that all card art is UGUI-compatible.
The opacity of a card is controlled with a Canvas Renderer, so if you are not using UGUI-compatible art and/or text, you'll need to adjust this script to compensate for it.
This script assumes you want the card to be either 100% or 0% opaque when idle. If you want to adjust a card to be partially opaque, you'll need to extend the functionality of this script.
Should be attached to a DSCard prefab.
|
inline |
Returns whether the card is currently fading.
|
inline |
Call this to fade the card to 100% opacity.
fadeSpeed is a time multiplier.
If no fadeSpeed is input, than a _DEFAULT_FADE_SPEED constant is used.
|
inline |
Call this to fade the card to 0% opacity.
fadeSpeed is a time multiplier.
If no fadeSpeed is input, than a _DEFAULT_FADE_SPEED constant is used.
|
inline |
Call this method to change the card's opacity.
fadeSpeed is a time multiplier.
A fadeSpeed of 0 results in an instant change to the fadeTarget.
If no fadeSpeed is input, than a _DEFAULT_FADE_SPEED constant is used.
|
inline |
Call this to instantly make the card visible or hidden with no gradual fade.
|
inline |
Returns the CanvasGroup's current alpha value.
|
inline |
Returns a DSVisibilityState, a general describer of what visual state the card is in.
|
getset |
A default alpha value for the card. By default DSCard should have a CanvasGroup attached to control card fade.