Feel  3.16
The best way to improve your game's feel and make it extra juicy
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 More...
 
float CountTo = 10f
 the value to count towards More...
 
MMTweenType CountingCurve = new MMTweenType(new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(1, 0)))
 the curve on which to animate the count More...
 
float Duration = 5f
 the duration of the count, in seconds More...
 
string Format = "00.00"
 the format with which to display the count More...
 
bool FloorValues = true
 whether or not value should be floored More...
 
float MinRefreshFrequency = 0f
 the minimum frequency (in seconds) at which to refresh the text field 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 CustomPlayFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 On play we change the text of our target TMPText over time More...
 
virtual IEnumerator CountCo ()
 A coroutine used to animate the text More...
 
virtual void UpdateText (float currentValue)
 Updates the text of the target TMPText component with the updated value More...
 
virtual float ProcessCount ()
 Computes the new value of the count for the current time More...
 
override void CustomRestoreInitialValues ()
 On restore, we put our object back at its initial position More...
 

Protected Attributes

string _newText
 
float _startTime
 
float _lastRefreshAt
 
string _initialText
 

Properties

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

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

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

Parameters
position
feedbacksIntensity

Implements MoreMountains.Feedbacks.MMF_Feedback.

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

◆ 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

◆ _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(0.3f, 1f), new Keyframe(1, 0)))

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: