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

This feedback will let you reveal words, lines, or characters in a target TMP, one at a time More...

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

Public Types

enum  RevealModes { RevealModes.Character, RevealModes.Lines, RevealModes.Words }
 the possible ways to reveal the text More...
 
enum  DurationModes { DurationModes.Interval, DurationModes.TotalDuration }
 whether to define duration by the time interval between two unit reveals, or by the total duration the reveal should take More...
 

Public Attributes

bool ReplaceText = false
 whether or not to replace the current TMP target's text on play More...
 
string NewText = "Hello World"
 the new text to replace the old one with More...
 
RevealModes RevealMode = RevealModes.Character
 the selected way to reveal the text (character by character, word by word, or line by line) More...
 
DurationModes DurationMode = DurationModes.Interval
 whether to define duration by the time interval between two unit reveals, or by the total duration the reveal should take More...
 
float IntervalBetweenReveals = 0.05f
 the interval (in seconds) between two reveals More...
 
float RevealDuration = 1f
 the total duration of the text reveal, in seconds More...
 
UnityEvent OnReveal
 a UnityEvent to invoke every time a reveal happens (word, line or character) More...
 
bool AllowHierarchyActivationForDurationComputation = false
 alright so that one will be weird : for reasons, TextMeshPro won't let you read the length of a disabled text, so to do so, we need to enable it, even if it's just to disable it again right after. If you're targeting a disabled text, or a text that is part of a disabled hierarchy, you'll probably want to set this to true so that the system can proceed with accurate duration computation. If you don't, and your target transform is disabled, duration won't be computed correctly. 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 More...
 
override void CustomRestoreInitialValues ()
 On restore, we put our object back at its initial position More...
 

Protected Attributes

string _originalText
 
float _delay
 
Coroutine _coroutine
 
int _richTextLength
 
int _totalCharacters
 
int _totalLines
 
int _totalWords
 
string _initialText
 
int _indexLastTime = -1
 

Additional Inherited Members

Detailed Description

This feedback will let you reveal words, lines, or characters in a target TMP, one at a time

Member Enumeration Documentation

◆ DurationModes

whether to define duration by the time interval between two unit reveals, or by the total duration the reveal should take

Enumerator
Interval 
TotalDuration 

◆ RevealModes

the possible ways to reveal the text

Enumerator
Character 
Lines 
Words 

Member Function Documentation

◆ CustomPlayFeedback()

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

On play we change the text of our target TMPText

Parameters
position
feedbacksIntensity

Implements MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomRestoreInitialValues()

override void MoreMountains.Feedbacks.MMF_TMPTextReveal.CustomRestoreInitialValues ( )
protectedvirtual

On restore, we put our object back at its initial position

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

Member Data Documentation

◆ _coroutine

Coroutine MoreMountains.Feedbacks.MMF_TMPTextReveal._coroutine
protected

◆ _delay

float MoreMountains.Feedbacks.MMF_TMPTextReveal._delay
protected

◆ _indexLastTime

int MoreMountains.Feedbacks.MMF_TMPTextReveal._indexLastTime = -1
protected

◆ _initialText

string MoreMountains.Feedbacks.MMF_TMPTextReveal._initialText
protected

◆ _originalText

string MoreMountains.Feedbacks.MMF_TMPTextReveal._originalText
protected

◆ _richTextLength

int MoreMountains.Feedbacks.MMF_TMPTextReveal._richTextLength
protected

◆ _totalCharacters

int MoreMountains.Feedbacks.MMF_TMPTextReveal._totalCharacters
protected

◆ _totalLines

int MoreMountains.Feedbacks.MMF_TMPTextReveal._totalLines
protected

◆ _totalWords

int MoreMountains.Feedbacks.MMF_TMPTextReveal._totalWords
protected

◆ AllowHierarchyActivationForDurationComputation

bool MoreMountains.Feedbacks.MMF_TMPTextReveal.AllowHierarchyActivationForDurationComputation = false

alright so that one will be weird : for reasons, TextMeshPro won't let you read the length of a disabled text, so to do so, we need to enable it, even if it's just to disable it again right after. If you're targeting a disabled text, or a text that is part of a disabled hierarchy, you'll probably want to set this to true so that the system can proceed with accurate duration computation. If you don't, and your target transform is disabled, duration won't be computed correctly.

◆ DurationMode

DurationModes MoreMountains.Feedbacks.MMF_TMPTextReveal.DurationMode = DurationModes.Interval

whether to define duration by the time interval between two unit reveals, or by the total duration the reveal should take

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_TMPTextReveal.FeedbackTypeAuthorized = true
static

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

◆ IntervalBetweenReveals

float MoreMountains.Feedbacks.MMF_TMPTextReveal.IntervalBetweenReveals = 0.05f

the interval (in seconds) between two reveals

◆ NewText

string MoreMountains.Feedbacks.MMF_TMPTextReveal.NewText = "Hello World"

the new text to replace the old one with

◆ OnReveal

UnityEvent MoreMountains.Feedbacks.MMF_TMPTextReveal.OnReveal

a UnityEvent to invoke every time a reveal happens (word, line or character)

◆ ReplaceText

bool MoreMountains.Feedbacks.MMF_TMPTextReveal.ReplaceText = false

whether or not to replace the current TMP target's text on play

◆ RevealDuration

float MoreMountains.Feedbacks.MMF_TMPTextReveal.RevealDuration = 1f

the total duration of the text reveal, in seconds

◆ RevealMode

RevealModes MoreMountains.Feedbacks.MMF_TMPTextReveal.RevealMode = RevealModes.Character

the selected way to reveal the text (character by character, word by word, or line by line)


The documentation for this class was generated from the following file: