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

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

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

Public Types

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

Public Attributes

override bool HasAutomatedTargetAcquisition => true
 sets the inspector color for this feedback More...
 
Text TargetText
 the Text component to control More...
 
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
 a static bool used to disable all feedbacks of this type at once More...
 

Protected Member Functions

override void AutomateTargetAcquisition ()
 A method meant to be implemented per feedback letting you specify what happens (usually setting a target) More...
 
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...
 
virtual void SetColor (float time)
 Applies the color change More...
 
override void CustomStopFeedback (Vector3 position, float feedbacksIntensity=1)
 Stops the coroutine if needed 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 Text over time

Member Enumeration Documentation

◆ ColorModes

Enumerator
Instant 
Gradient 
Interpolate 

Member Function Documentation

◆ AutomateTargetAcquisition()

override void MoreMountains.Feedbacks.MMF_TextColor.AutomateTargetAcquisition ( )
protectedvirtual

A method meant to be implemented per feedback letting you specify what happens (usually setting a target)

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ ChangeColor()

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

Changes the color of the text over time

Returns

◆ CustomInitialization()

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

Stops the coroutine if needed

Parameters
position
feedbacksIntensity

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ SetColor()

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

Applies the color change

Parameters
time

Member Data Documentation

◆ _coroutine

Coroutine MoreMountains.Feedbacks.MMF_TextColor._coroutine
protected

◆ _initialColor

Color MoreMountains.Feedbacks.MMF_TextColor._initialColor
protected

◆ AllowAdditivePlays

bool MoreMountains.Feedbacks.MMF_TextColor.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_TextColor.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_TextColor.ColorGradient

the gradient to use to animate the color over time

◆ ColorMode

ColorModes MoreMountains.Feedbacks.MMF_TextColor.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_TextColor.DestinationColor = Color.yellow

the destination color when in interpolate mode

◆ Duration

float MoreMountains.Feedbacks.MMF_TextColor.Duration = 0.2f

how long the color of the text should change over time

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_TextColor.FeedbackTypeAuthorized = true
static

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

◆ HasAutomatedTargetAcquisition

override bool MoreMountains.Feedbacks.MMF_TextColor.HasAutomatedTargetAcquisition => true

sets the inspector color for this feedback

◆ InstantColor

Color MoreMountains.Feedbacks.MMF_TextColor.InstantColor = Color.yellow

the color to apply

◆ TargetText

Text MoreMountains.Feedbacks.MMF_TextColor.TargetText

the Text component to control

Property Documentation

◆ FeedbackDuration

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