Feel  4.3
The best way to improve your game's feel and make it extra juicy
MoreMountains.Feedbacks.MMF_TMPColor Class Reference

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

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

Public Types

enum  ColorModes { ColorModes.Instant, ColorModes.Gradient, ColorModes.Interpolate }
 

Public Attributes

ColorModes ColorMode = ColorModes.Interpolate
 
float Duration = 0.2f
 how long the color of the text should change over time More...
 
Color InstantColor = Color.yellow
 the color to apply More...
 
Gradient ColorGradient
 the gradient to use to animate the color over time More...
 
Color DestinationColor = Color.yellow
 the destination color when in interpolate mode More...
 
AnimationCurve ColorCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.5f, 1), new Keyframe(1, 0))
 the curve to use when interpolating towards the destination color 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 color More...
 
override void CustomPlayFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 On Play we change our text's color More...
 
virtual IEnumerator ChangeColor ()
 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 SetColor (float time)
 Applies the color change More...
 
override void CustomRestoreInitialValues ()
 On restore, we put our object back at its initial position More...
 

Protected Attributes

Color _initialColor
 
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 color of a target TMP over time

Member Enumeration Documentation

◆ ColorModes

Enumerator
Instant 
Gradient 
Interpolate 

Member Function Documentation

◆ ChangeColor()

virtual IEnumerator MoreMountains.Feedbacks.MMF_TMPColor.ChangeColor ( )
protectedvirtual

Changes the color of the text over time

Returns

◆ CustomInitialization()

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

On init we store our initial color

Parameters
owner

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomPlayFeedback()

override void MoreMountains.Feedbacks.MMF_TMPColor.CustomPlayFeedback ( Vector3  position,
float  feedbacksIntensity = 1.0f 
)
protectedvirtual

On Play we change our text's color

Parameters
position
feedbacksIntensity

Implements MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomRestoreInitialValues()

override void MoreMountains.Feedbacks.MMF_TMPColor.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_TMPColor.CustomStopFeedback ( Vector3  position,
float  feedbacksIntensity = 1 
)
protectedvirtual

Stops the animation if needed

Parameters
position
feedbacksIntensity

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ SetColor()

virtual void MoreMountains.Feedbacks.MMF_TMPColor.SetColor ( float  time)
protectedvirtual

Applies the color change

Parameters
time

Member Data Documentation

◆ _coroutine

Coroutine MoreMountains.Feedbacks.MMF_TMPColor._coroutine
protected

◆ _initialColor

Color MoreMountains.Feedbacks.MMF_TMPColor._initialColor
protected

◆ AllowAdditivePlays

bool MoreMountains.Feedbacks.MMF_TMPColor.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

◆ ColorCurve

AnimationCurve MoreMountains.Feedbacks.MMF_TMPColor.ColorCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.5f, 1), new Keyframe(1, 0))

the curve to use when interpolating towards the destination color

◆ ColorGradient

Gradient MoreMountains.Feedbacks.MMF_TMPColor.ColorGradient

the gradient to use to animate the color over time

◆ ColorMode

ColorModes MoreMountains.Feedbacks.MMF_TMPColor.ColorMode = ColorModes.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

◆ DestinationColor

Color MoreMountains.Feedbacks.MMF_TMPColor.DestinationColor = Color.yellow

the destination color when in interpolate mode

◆ Duration

float MoreMountains.Feedbacks.MMF_TMPColor.Duration = 0.2f

how long the color of the text should change over time

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_TMPColor.FeedbackTypeAuthorized = true
static

sets the inspector color for this feedback

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

◆ InstantColor

Color MoreMountains.Feedbacks.MMF_TMPColor.InstantColor = Color.yellow

the color to apply

Property Documentation

◆ FeedbackDuration

override float? MoreMountains.Feedbacks.MMF_TMPColor.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: