TopDown Engine v4.5
Loading...
Searching...
No Matches
MoreMountains.Feedbacks.MMF_TMPAlpha Class Reference

This feedback lets you control the alpha of a target TMP over time. More...

Inheritance diagram for MoreMountains.Feedbacks.MMF_TMPAlpha:
MoreMountains.Feedbacks.MMF_Feedback

Public Types

enum  AlphaModes { Instant , Interpolate , ToDestination }

Public Member Functions

override void OnValidate ()
 On Validate, we init our curves conditions if needed.

Public Attributes

AlphaModes AlphaMode = AlphaModes.Interpolate
float Duration = 0.2f
 how long the color of the text should change over time
float InstantAlpha = 1f
 the alpha to apply when in instant mode
MMTweenType Curve = new MMTweenType(MMTween.MMTweenCurve.EaseInCubic, "", "AlphaMode", (int)AlphaModes.Interpolate, (int)AlphaModes.ToDestination)
 the curve to use when interpolating towards the destination alpha
float CurveRemapZero = 0f
 the value to which the curve's 0 should be remapped
float CurveRemapOne = 1f
 the value to which the curve's 1 should be remapped
float DestinationAlpha = 1f
 the alpha to aim towards when in ToDestination mode
bool AllowAdditivePlays = false
 if this is true, calling that feedback will trigger it, even if it's in progress. If it's false, it'll prevent any new Play until the current one is over

Static Public Attributes

static bool FeedbackTypeAuthorized = true
 sets the inspector color for this feedback

Protected Member Functions

override void CustomInitialization (MMF_Player owner)
 On init we store our initial alpha.
override void CustomPlayFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 On Play we change our text's alpha.
virtual IEnumerator ChangeAlpha ()
 Changes the color of the text over time.
override void CustomStopFeedback (Vector3 position, float feedbacksIntensity=1)
 Stops the animation if needed.
virtual void SetAlpha (float time)
 Applies the alpha change.
override void CustomRestoreInitialValues ()
 On restore, we put our object back at its initial position.

Protected Attributes

float _initialAlpha
Coroutine _coroutine

Properties

override float FeedbackDuration [get, set]
 the duration of this feedback is the duration of the color transition, or 0 if instant

Detailed Description

This feedback lets you control the alpha of a target TMP over time.

Member Enumeration Documentation

◆ AlphaModes

Enumerator
Instant 
Interpolate 
ToDestination 

Member Function Documentation

◆ ChangeAlpha()

virtual IEnumerator MoreMountains.Feedbacks.MMF_TMPAlpha.ChangeAlpha ( )
protectedvirtual

Changes the color of the text over time.

Returns

◆ CustomInitialization()

override void MoreMountains.Feedbacks.MMF_TMPAlpha.CustomInitialization ( MMF_Player owner)
protectedvirtual

On init we store our initial alpha.

Parameters
owner

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomPlayFeedback()

override void MoreMountains.Feedbacks.MMF_TMPAlpha.CustomPlayFeedback ( Vector3 position,
float feedbacksIntensity = 1::0f )
protected

On Play we change our text's alpha.

Parameters
position
feedbacksIntensity

◆ CustomRestoreInitialValues()

override void MoreMountains.Feedbacks.MMF_TMPAlpha.CustomRestoreInitialValues ( )
protectedvirtual

On restore, we put our object back at its initial position.

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomStopFeedback()

override void MoreMountains.Feedbacks.MMF_TMPAlpha.CustomStopFeedback ( Vector3 position,
float feedbacksIntensity = 1 )
protectedvirtual

Stops the animation if needed.

Parameters
position
feedbacksIntensity

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ OnValidate()

override void MoreMountains.Feedbacks.MMF_TMPAlpha.OnValidate ( )
virtual

On Validate, we init our curves conditions if needed.

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ SetAlpha()

virtual void MoreMountains.Feedbacks.MMF_TMPAlpha.SetAlpha ( float time)
protectedvirtual

Applies the alpha change.

Parameters
time

Member Data Documentation

◆ _coroutine

Coroutine MoreMountains.Feedbacks.MMF_TMPAlpha._coroutine
protected

◆ _initialAlpha

float MoreMountains.Feedbacks.MMF_TMPAlpha._initialAlpha
protected

◆ AllowAdditivePlays

bool MoreMountains.Feedbacks.MMF_TMPAlpha.AllowAdditivePlays = false

if this is true, calling that feedback will trigger it, even if it's in progress. If it's false, it'll prevent any new Play until the current one is over

◆ AlphaMode

AlphaModes MoreMountains.Feedbacks.MMF_TMPAlpha.AlphaMode = AlphaModes.Interpolate

the selected color mode : None : nothing will happen, gradient : evaluates the color over time on that gradient, from left to right, interpolate : lerps from the current color to the destination one

◆ Curve

MMTweenType MoreMountains.Feedbacks.MMF_TMPAlpha.Curve = new MMTweenType(MMTween.MMTweenCurve.EaseInCubic, "", "AlphaMode", (int)AlphaModes.Interpolate, (int)AlphaModes.ToDestination)

the curve to use when interpolating towards the destination alpha

◆ CurveRemapOne

float MoreMountains.Feedbacks.MMF_TMPAlpha.CurveRemapOne = 1f

the value to which the curve's 1 should be remapped

◆ CurveRemapZero

float MoreMountains.Feedbacks.MMF_TMPAlpha.CurveRemapZero = 0f

the value to which the curve's 0 should be remapped

◆ DestinationAlpha

float MoreMountains.Feedbacks.MMF_TMPAlpha.DestinationAlpha = 1f

the alpha to aim towards when in ToDestination mode

◆ Duration

float MoreMountains.Feedbacks.MMF_TMPAlpha.Duration = 0.2f

how long the color of the text should change over time

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_TMPAlpha.FeedbackTypeAuthorized = true
static

sets the inspector color for this feedback

a static bool used to disable all feedbacks of this type at once

◆ InstantAlpha

float MoreMountains.Feedbacks.MMF_TMPAlpha.InstantAlpha = 1f

the alpha to apply when in instant mode

Property Documentation

◆ FeedbackDuration

override float MoreMountains.Feedbacks.MMF_TMPAlpha.FeedbackDuration
getset

the duration of this feedback is the duration of the color transition, or 0 if instant


The documentation for this class was generated from the following file:
  • H:/Code/MoreMountains/topdownengine/Assets/TopDownEngine/ThirdParty/MoreMountains/MMFeedbacks/MMFeedbacksForThirdParty/TextMeshPro/Feedbacks/MMF_TMPAlpha.cs