TopDown Engine
v3.6
|
The Fader class can be put on an Image, and it'll intercept MMFadeEvents and turn itself on or off accordingly. This specific fader will move from left to right, right to left, top to bottom or bottom to top More...
Public Types | |
enum | Directions { Directions.TopToBottom, Directions.LeftToRight, Directions.RightToLeft, Directions.BottomToTop } |
the possible directions this fader can move in More... | |
Public Member Functions | |
virtual void | OnMMEvent (MMFadeEvent fadeEvent) |
When catching a fade event, we fade our image in or out More... | |
virtual void | OnMMEvent (MMFadeInEvent fadeEvent) |
When catching an MMFadeInEvent, we fade our image in More... | |
virtual void | OnMMEvent (MMFadeOutEvent fadeEvent) |
When catching an MMFadeOutEvent, we fade our image out More... | |
virtual void | OnMMEvent (MMFadeStopEvent fadeStopEvent) |
When catching an MMFadeStopEvent, we stop our fade More... | |
Public Member Functions inherited from MoreMountains.Tools.MMEventListener< MMFadeEvent > | |
void | OnMMEvent (T eventType) |
Public Member Functions inherited from MoreMountains.Tools.MMEventListener< MMFadeInEvent > | |
void | OnMMEvent (T eventType) |
Public Member Functions inherited from MoreMountains.Tools.MMEventListener< MMFadeOutEvent > | |
void | OnMMEvent (T eventType) |
Public Member Functions inherited from MoreMountains.Tools.MMEventListener< MMFadeStopEvent > | |
void | OnMMEvent (T eventType) |
Public Attributes | |
int | ID |
the ID for this fader (0 is default), set more IDs if you need more than one fader More... | |
Directions | FadeInDirection = Directions.LeftToRight |
the direction this fader should move in when fading in More... | |
Directions | FadeOutDirection = Directions.LeftToRight |
the direction this fader should move in when fading out More... | |
float | DefaultDuration = 0.2f |
the default duration of the fade in/out More... | |
MMTweenType | DefaultTween = new MMTweenType(MMTween.MMTweenCurve.LinearTween) |
the default curve to use for this fader More... | |
bool | IgnoreTimescale = true |
whether or not the fade should happen in unscaled time More... | |
bool | DisableOnInit = true |
whether or not to automatically disable this fader on init More... | |
float | InitialDelay = 0f |
a delay (in seconds) to apply before playing this fade More... | |
bool | ShouldBlockRaycasts = false |
whether or not the fader should block raycasts when visible More... | |
bool | FadeIn1SecondButton |
bool | FadeOut1SecondButton |
bool | DefaultFadeButton |
bool | ResetFaderButton |
Protected Member Functions | |
virtual void | ResetFader () |
Test method triggered by an inspector button More... | |
virtual void | DefaultFade () |
Test method triggered by an inspector button More... | |
virtual void | FadeIn1Second () |
Test method triggered by an inspector button More... | |
virtual void | FadeOut1Second () |
Test method triggered by an inspector button More... | |
virtual void | Start () |
On Start, we initialize our fader More... | |
virtual void | Initialization () |
On init, we grab our components, and disable/hide everything More... | |
virtual void | Update () |
On Update, we update our alpha More... | |
virtual void | Fade () |
Fades the canvasgroup towards its target alpha More... | |
virtual void | StopFading () |
Stops the fading. More... | |
virtual IEnumerator | StartFading (bool fadingIn, float duration, MMTweenType curve, int id, bool ignoreTimeScale, Vector3 worldPosition) |
Starts a fade More... | |
virtual Vector2 | BeforeEntryPosition () |
Determines the position of the fader before entry More... | |
virtual Vector2 | ExitPosition () |
Determines the exit position of the fader More... | |
virtual void | DisableFader () |
Disables the fader. More... | |
virtual void | EnableFader () |
Enables the fader. More... | |
virtual void | OnEnable () |
On enable, we start listening to events More... | |
virtual void | OnDestroy () |
On disable, we stop listening to events More... | |
Protected Attributes | |
RectTransform | _rectTransform |
CanvasGroup | _canvasGroup |
float | _currentDuration |
MMTweenType | _currentCurve |
bool | _fading = false |
float | _fadeStartedAt |
Vector2 | _initialPosition |
Vector2 | _fromPosition |
Vector2 | _toPosition |
Vector2 | _newPosition |
bool | _active |
bool | _initialized = false |
Properties | |
virtual float | Width [get] |
the width of the fader More... | |
virtual float | Height [get] |
the height of the fader More... | |
The Fader class can be put on an Image, and it'll intercept MMFadeEvents and turn itself on or off accordingly. This specific fader will move from left to right, right to left, top to bottom or bottom to top
|
protectedvirtual |
Determines the position of the fader before entry
|
protectedvirtual |
Test method triggered by an inspector button
|
protectedvirtual |
Disables the fader.
|
protectedvirtual |
Enables the fader.
|
protectedvirtual |
Determines the exit position of the fader
|
protectedvirtual |
Fades the canvasgroup towards its target alpha
|
protectedvirtual |
Test method triggered by an inspector button
|
protectedvirtual |
Test method triggered by an inspector button
|
protectedvirtual |
On init, we grab our components, and disable/hide everything
|
protectedvirtual |
On disable, we stop listening to events
|
protectedvirtual |
On enable, we start listening to events
|
virtual |
When catching a fade event, we fade our image in or out
fadeEvent | Fade event. |
|
virtual |
When catching an MMFadeInEvent, we fade our image in
fadeEvent | Fade event. |
|
virtual |
When catching an MMFadeOutEvent, we fade our image out
fadeEvent | Fade event. |
|
virtual |
When catching an MMFadeStopEvent, we stop our fade
fadeEvent | Fade event. |
|
protectedvirtual |
Test method triggered by an inspector button
|
protectedvirtual |
On Start, we initialize our fader
|
protectedvirtual |
Starts a fade
fadingIn | |
duration | |
curve | |
id | |
ignoreTimeScale | |
worldPosition |
|
protectedvirtual |
Stops the fading.
|
protectedvirtual |
On Update, we update our alpha
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
float MoreMountains.Tools.MMFaderDirectional.DefaultDuration = 0.2f |
the default duration of the fade in/out
bool MoreMountains.Tools.MMFaderDirectional.DefaultFadeButton |
MMTweenType MoreMountains.Tools.MMFaderDirectional.DefaultTween = new MMTweenType(MMTween.MMTweenCurve.LinearTween) |
the default curve to use for this fader
bool MoreMountains.Tools.MMFaderDirectional.DisableOnInit = true |
whether or not to automatically disable this fader on init
bool MoreMountains.Tools.MMFaderDirectional.FadeIn1SecondButton |
Directions MoreMountains.Tools.MMFaderDirectional.FadeInDirection = Directions.LeftToRight |
the direction this fader should move in when fading in
bool MoreMountains.Tools.MMFaderDirectional.FadeOut1SecondButton |
Directions MoreMountains.Tools.MMFaderDirectional.FadeOutDirection = Directions.LeftToRight |
the direction this fader should move in when fading out
int MoreMountains.Tools.MMFaderDirectional.ID |
the ID for this fader (0 is default), set more IDs if you need more than one fader
bool MoreMountains.Tools.MMFaderDirectional.IgnoreTimescale = true |
whether or not the fade should happen in unscaled time
float MoreMountains.Tools.MMFaderDirectional.InitialDelay = 0f |
a delay (in seconds) to apply before playing this fade
bool MoreMountains.Tools.MMFaderDirectional.ResetFaderButton |
bool MoreMountains.Tools.MMFaderDirectional.ShouldBlockRaycasts = false |
whether or not the fader should block raycasts when visible
|
get |
the height of the fader
|
get |
the width of the fader