Feel  3.16
The best way to improve your game's feel and make it extra juicy
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 { PositionModes.TargetTransform, PositionModes.FeedbackPosition, PositionModes.PlayPosition }
 the possible places where the floating text should spawn at More...
 
enum  RoundingMethods { RoundingMethods.NoRounding, RoundingMethods.Round, RoundingMethods.Ceil, RoundingMethods.Floor }
 the possible methods that can be applied to the output value (when using intensity as the output value, string values won't get rounded) More...
 

Public Attributes

override bool HasChannel => true
 
override bool HasRandomness => true
 
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...
 
RoundingMethods RoundingMethod = RoundingMethods.NoRounding
 the rounding methods to apply to the output value (when using intensity as the output value, string values won't get rounded) 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...
 
virtual float ApplyRounding (float value)
 

Protected Attributes

Vector3 _playPosition
 
string _value
 

Properties

override float FeedbackDuration [get, set]
 sets the inspector color for this feedback More...
 

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 

◆ RoundingMethods

the possible methods that can be applied to the output value (when using intensity as the output value, string values won't get rounded)

Enumerator
NoRounding 
Round 
Ceil 
Floor 

Member Function Documentation

◆ ApplyRounding()

virtual float MoreMountains.Feedbacks.MMF_FloatingText.ApplyRounding ( float  value)
protectedvirtual

◆ 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

◆ HasChannel

override bool MoreMountains.Feedbacks.MMF_FloatingText.HasChannel => true

◆ HasRandomness

override bool MoreMountains.Feedbacks.MMF_FloatingText.HasRandomness => true

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

◆ RoundingMethod

RoundingMethods MoreMountains.Feedbacks.MMF_FloatingText.RoundingMethod = RoundingMethods.NoRounding

the rounding methods to apply to the output value (when using intensity as the output value, string values won't get rounded)

◆ 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


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