Infinite Runner Engine v1.9
Public Types | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
MoreMountains.Feedbacks.MMF_FloatingText Class Reference

This feedback will request the spawn of a floating text, usually to signify damage, but not necessarily This requires that a MMFloatingTextSpawner be correctly setup in the scene, otherwise nothing will happen. To do so, create a new empty object, add a MMFloatingTextSpawner to it. Drag (at least) one MMFloatingText prefab into its PooledSimpleMMFloatingText slot. You'll find such prefabs already made in the MMTools/Tools/MMFloatingText/Prefabs folder, but feel free to create your own. Using that feedback will always spawn the same text. While this may be what you want, if you're using the Corgi Engine or TopDown Engine, you'll find dedicated versions directly hooked to the Health component, letting you display damage taken. More...

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

Public Types

enum  PositionModes { TargetTransform , FeedbackPosition , PlayPosition }
 the possible places where the floating text should spawn at More...
 

Public Attributes

float Intensity = 1f
 the Intensity to spawn this text with, will act as a lifetime/movement/scale multiplier based on the spawner's settings More...
 
string Value = "100"
 the value to display when spawning this text More...
 
bool UseIntensityAsValue = false
 if this is true, the intensity passed to this feedback will be the value displayed More...
 
bool ForceColor = false
 whether or not to force a color on the new text, if not, the default colors of the spawner will be used More...
 
Gradient AnimateColorGradient = new Gradient()
 the gradient to apply over the lifetime of the text More...
 
bool ForceLifetime = false
 whether or not to force a lifetime on the new text, if not, the default colors of the spawner will be used More...
 
float Lifetime = 0.5f
 the forced lifetime for the spawned text More...
 
PositionModes PositionMode = PositionModes.FeedbackPosition
 where to spawn the new text (at the position of the feedback, or on a specified Transform) More...
 
Transform TargetTransform
 in transform mode, the Transform on which to spawn the new floating text More...
 
Vector3 Direction = Vector3.zero
 the direction to apply to the new floating text (leave it to 0 to let the Spawner decide based on its settings) 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 ask the spawner on the specified channel to spawn a new floating text More...
 

Protected Attributes

Vector3 _playPosition
 
string _value
 

Properties

override float FeedbackDuration [getset]
 sets the inspector color for this feedback More...
 
override bool HasChannel [get]
 

Additional Inherited Members

Detailed Description

This feedback will request the spawn of a floating text, usually to signify damage, but not necessarily This requires that a MMFloatingTextSpawner be correctly setup in the scene, otherwise nothing will happen. To do so, create a new empty object, add a MMFloatingTextSpawner to it. Drag (at least) one MMFloatingText prefab into its PooledSimpleMMFloatingText slot. You'll find such prefabs already made in the MMTools/Tools/MMFloatingText/Prefabs folder, but feel free to create your own. Using that feedback will always spawn the same text. While this may be what you want, if you're using the Corgi Engine or TopDown Engine, you'll find dedicated versions directly hooked to the Health component, letting you display damage taken.

Member Enumeration Documentation

◆ PositionModes

the possible places where the floating text should spawn at

Enumerator
TargetTransform 
FeedbackPosition 
PlayPosition 

Member Function Documentation

◆ CustomPlayFeedback()

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

On play we ask the spawner on the specified channel to spawn a new floating text

Parameters
position
feedbacksIntensity

Implements MoreMountains.Feedbacks.MMF_Feedback.

Member Data Documentation

◆ _playPosition

Vector3 MoreMountains.Feedbacks.MMF_FloatingText._playPosition
protected

◆ _value

string MoreMountains.Feedbacks.MMF_FloatingText._value
protected

◆ AnimateColorGradient

Gradient MoreMountains.Feedbacks.MMF_FloatingText.AnimateColorGradient = new Gradient()

the gradient to apply over the lifetime of the text

◆ Direction

Vector3 MoreMountains.Feedbacks.MMF_FloatingText.Direction = Vector3.zero

the direction to apply to the new floating text (leave it to 0 to let the Spawner decide based on its settings)

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_FloatingText.FeedbackTypeAuthorized = true
static

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

◆ ForceColor

bool MoreMountains.Feedbacks.MMF_FloatingText.ForceColor = false

whether or not to force a color on the new text, if not, the default colors of the spawner will be used

◆ ForceLifetime

bool MoreMountains.Feedbacks.MMF_FloatingText.ForceLifetime = false

whether or not to force a lifetime on the new text, if not, the default colors of the spawner will be used

◆ Intensity

float MoreMountains.Feedbacks.MMF_FloatingText.Intensity = 1f

the Intensity to spawn this text with, will act as a lifetime/movement/scale multiplier based on the spawner's settings

◆ Lifetime

float MoreMountains.Feedbacks.MMF_FloatingText.Lifetime = 0.5f

the forced lifetime for the spawned text

◆ PositionMode

PositionModes MoreMountains.Feedbacks.MMF_FloatingText.PositionMode = PositionModes.FeedbackPosition

where to spawn the new text (at the position of the feedback, or on a specified Transform)

◆ TargetTransform

Transform MoreMountains.Feedbacks.MMF_FloatingText.TargetTransform

in transform mode, the Transform on which to spawn the new floating text

◆ UseIntensityAsValue

bool MoreMountains.Feedbacks.MMF_FloatingText.UseIntensityAsValue = false

if this is true, the intensity passed to this feedback will be the value displayed

◆ Value

string MoreMountains.Feedbacks.MMF_FloatingText.Value = "100"

the value to display when spawning this text

Property Documentation

◆ FeedbackDuration

override float MoreMountains.Feedbacks.MMF_FloatingText.FeedbackDuration
getset

sets the inspector color for this feedback

the duration of this feedback is a fixed value or the lifetime

◆ HasChannel

override bool MoreMountains.Feedbacks.MMF_FloatingText.HasChannel
get

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