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

This feedback will let you update a TMP text value over time, with a value going from A to B over time, on a curve. More...

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

Public Attributes

float CountFrom = 0f
 the value from which to count from
float CountTo = 10f
 the value to count towards
MMTweenType CountingCurve = new MMTweenType(new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1f)))
 the curve on which to animate the count
float Duration = 5f
 the duration of the count, in seconds
string Format = "00.00"
 the format with which to display the count
bool FloorValues = true
 whether or not value should be floored
float MinRefreshFrequency = 0f
 the minimum frequency (in seconds) at which to refresh the text field

Static Public Attributes

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

Protected Member Functions

override void CustomPlayFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 On play we change the text of our target TMPText over time.
virtual IEnumerator CountCo ()
 A coroutine used to animate the text.
virtual void UpdateText (float currentValue)
 Updates the text of the target TMPText component with the updated value.
virtual float ProcessCount ()
 Computes the new value of the count for the current time.
override void CustomStopFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 On stop, we interrupt counting if it was active.
override void CustomRestoreInitialValues ()
 On restore, we put our object back at its initial position.

Protected Attributes

string _newText
float _startTime
float _lastRefreshAt
string _initialText
Coroutine _coroutine

Properties

override float FeedbackDuration [get, set]
 the duration of this feedback is the duration of the scale animation

Additional Inherited Members

Detailed Description

This feedback will let you update a TMP text value over time, with a value going from A to B over time, on a curve.

Member Function Documentation

◆ CountCo()

virtual IEnumerator MoreMountains.Feedbacks.MMF_TMPCountTo.CountCo ( )
protectedvirtual

A coroutine used to animate the text.

Returns

◆ CustomPlayFeedback()

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

On play we change the text of our target TMPText over time.

Parameters
position
feedbacksIntensity

◆ CustomRestoreInitialValues()

override void MoreMountains.Feedbacks.MMF_TMPCountTo.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_TMPCountTo.CustomStopFeedback ( Vector3 position,
float feedbacksIntensity = 1::0f )
protectedvirtual

On stop, we interrupt counting if it was active.

Parameters
position
feedbacksIntensity

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ ProcessCount()

virtual float MoreMountains.Feedbacks.MMF_TMPCountTo.ProcessCount ( )
protectedvirtual

Computes the new value of the count for the current time.

Parameters
currentValue
Returns

◆ UpdateText()

virtual void MoreMountains.Feedbacks.MMF_TMPCountTo.UpdateText ( float currentValue)
protectedvirtual

Updates the text of the target TMPText component with the updated value.

Parameters
currentValue

Member Data Documentation

◆ _coroutine

Coroutine MoreMountains.Feedbacks.MMF_TMPCountTo._coroutine
protected

◆ _initialText

string MoreMountains.Feedbacks.MMF_TMPCountTo._initialText
protected

◆ _lastRefreshAt

float MoreMountains.Feedbacks.MMF_TMPCountTo._lastRefreshAt
protected

◆ _newText

string MoreMountains.Feedbacks.MMF_TMPCountTo._newText
protected

◆ _startTime

float MoreMountains.Feedbacks.MMF_TMPCountTo._startTime
protected

◆ CountFrom

float MoreMountains.Feedbacks.MMF_TMPCountTo.CountFrom = 0f

the value from which to count from

◆ CountingCurve

MMTweenType MoreMountains.Feedbacks.MMF_TMPCountTo.CountingCurve = new MMTweenType(new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1f)))

the curve on which to animate the count

◆ CountTo

float MoreMountains.Feedbacks.MMF_TMPCountTo.CountTo = 10f

the value to count towards

◆ Duration

float MoreMountains.Feedbacks.MMF_TMPCountTo.Duration = 5f

the duration of the count, in seconds

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_TMPCountTo.FeedbackTypeAuthorized = true
static

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

◆ FloorValues

bool MoreMountains.Feedbacks.MMF_TMPCountTo.FloorValues = true

whether or not value should be floored

◆ Format

string MoreMountains.Feedbacks.MMF_TMPCountTo.Format = "00.00"

the format with which to display the count

◆ MinRefreshFrequency

float MoreMountains.Feedbacks.MMF_TMPCountTo.MinRefreshFrequency = 0f

the minimum frequency (in seconds) at which to refresh the text field

Property Documentation

◆ FeedbackDuration

override float MoreMountains.Feedbacks.MMF_TMPCountTo.FeedbackDuration
getset

the duration of this feedback is the duration of the scale animation


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