Feel 5.9.1
The best way to improve your game's feel and make it extra juicy
Loading...
Searching...
No Matches
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 { Instant , Gradient , Interpolate }

Public Attributes

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

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

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

On Play we change our text's color.

Parameters
position
feedbacksIntensity

◆ 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:
  • H:/Code/MoreMountains/feel/Assets/Feel/MMFeedbacks/MMFeedbacksForThirdParty/TextMeshPro/Feedbacks/MMF_TMPColor.cs