Feel  3.16
The best way to improve your game's feel and make it extra juicy
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 { AlphaModes.Instant, AlphaModes.Interpolate, AlphaModes.ToDestination }
 

Public Attributes

AlphaModes AlphaMode = AlphaModes.Interpolate
 
float Duration = 0.2f
 how long the color of the text should change over time More...
 
float InstantAlpha = 1f
 the alpha to apply when in instant mode More...
 
MMTweenType Curve = new MMTweenType(MMTween.MMTweenCurve.EaseInCubic)
 the curve to use when interpolating towards the destination alpha More...
 
float CurveRemapZero = 0f
 the value to which the curve's 0 should be remapped More...
 
float CurveRemapOne = 1f
 the value to which the curve's 1 should be remapped More...
 
float DestinationAlpha = 1f
 the alpha to aim towards when in ToDestination mode More...
 
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 More...
 

Static Public Attributes

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

Protected Member Functions

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

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 More...
 

Additional Inherited Members

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 
)
protectedvirtual

On Play we change our text's alpha

Parameters
position
feedbacksIntensity

Implements MoreMountains.Feedbacks.MMF_Feedback.

◆ 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.

◆ 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)

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: