Feel  4.3
The best way to improve your game's feel and make it extra juicy
MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitFloatBase Class Reference

A base feedback to set a float on a target UI Document More...

Inheritance diagram for MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitFloatBase:
MoreMountains.FeedbacksForThirdParty.MMF_UIToolkit MoreMountains.Feedbacks.MMF_Feedback MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitBorderRadius MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitBorderWidth MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitFontSize MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitOpacity MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitRotate

Public Types

enum  Modes { Modes.Instant, Modes.Interpolate, Modes.ToDestination }
 a static bool used to disable all feedbacks of this type at once More...
 
- Public Types inherited from MoreMountains.FeedbacksForThirdParty.MMF_UIToolkit
enum  QueryModes { QueryModes.Name, QueryModes.Class }
 

Public Attributes

override bool HasCustomInspectors => true
 
Modes Mode = Modes.Interpolate
 
bool RelativeValue = false
 whether or not the value should be applied relatively to the initial value More...
 
bool AllowAdditivePlays = false
 if this is true, calling that feedback will trigger it, even if it's in progress. If it's false, it'll prevent any new Play until the current one is over More...
 
float Duration = 0.2f
 how long the color of the text should change over time More...
 
float InstantValue = 1f
 the value to apply when in instant mode More...
 
MMTweenType Curve = new MMTweenType(MMTween.MMTweenCurve.EaseInCubic)
 the curve to use when interpolating towards the destination value More...
 
float CurveRemapZero = 0f
 the value to which the curve's 0 should be remapped More...
 
float CurveRemapOne = 1f
 the value to which the curve's 1 should be remapped More...
 
float DestinationValue = 1f
 the value to aim towards when in ToDestination mode More...
 
- Public Attributes inherited from MoreMountains.FeedbacksForThirdParty.MMF_UIToolkit
override bool HasAutomatedTargetAcquisition => true
 sets the inspector color for this feedback More...
 
UIDocument TargetDocument
 the UI document on which to make modifications More...
 
QueryModes QueryMode = QueryModes.Name
 the way to perform the query, either via element name or via class More...
 
string Query = "ButtonA"
 the query to perform (replace this with your own element name or class) More...
 
bool MarkDirty = false
 whether to mark the UI document dirty after the operation. Set this to true when making a change that requires a repaint such as when using generateVisualContent to render a mesh and the mesh data has now changed. More...
 

Protected Member Functions

override void CustomInitialization (MMF_Player owner)
 On init we store our initial value More...
 
override void CustomPlayFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 On Play we change our text's alpha More...
 
virtual IEnumerator ChangeValue ()
 Changes the color of the text over time More...
 
override void CustomStopFeedback (Vector3 position, float feedbacksIntensity=1)
 Stops the animation if needed More...
 
virtual void ApplyTime (float time)
 Applies the alpha change More...
 
virtual void SetValue (float newValue)
 
virtual float GetInitialValue ()
 
override void CustomRestoreInitialValues ()
 On restore, we put our object back at its initial position More...
 
- Protected Member Functions inherited from MoreMountains.FeedbacksForThirdParty.MMF_UIToolkit
override void AutomateTargetAcquisition ()
 A method meant to be implemented per feedback letting you specify what happens (usually setting a target) More...
 
virtual void PerformQuery ()
 Performs the query and sets _visualElements with the result More...
 
virtual void HandleMarkDirty (VisualElement element)
 

Protected Attributes

float _initialValue
 
Coroutine _coroutine
 
- Protected Attributes inherited from MoreMountains.FeedbacksForThirdParty.MMF_UIToolkit
List< VisualElement > _visualElements = new List<VisualElement>()
 

Properties

override float? FeedbackDuration [get, set]
 the duration of this feedback is the duration of the color transition, or 0 if instant More...
 

Additional Inherited Members

- Static Public Attributes inherited from MoreMountains.FeedbacksForThirdParty.MMF_UIToolkit
static bool FeedbackTypeAuthorized = true
 a static bool used to disable all feedbacks of this type at once More...
 

Detailed Description

A base feedback to set a float on a target UI Document

Member Enumeration Documentation

◆ Modes

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

Enumerator
Instant 
Interpolate 
ToDestination 

Member Function Documentation

◆ ApplyTime()

virtual void MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitFloatBase.ApplyTime ( float  time)
protectedvirtual

Applies the alpha change

Parameters
time

◆ ChangeValue()

virtual IEnumerator MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitFloatBase.ChangeValue ( )
protectedvirtual

Changes the color of the text over time

Returns

◆ CustomInitialization()

override void MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitFloatBase.CustomInitialization ( MMF_Player  owner)
protectedvirtual

On init we store our initial value

Parameters
owner

Reimplemented from MoreMountains.FeedbacksForThirdParty.MMF_UIToolkit.

◆ CustomPlayFeedback()

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

On Play we change our text's alpha

Parameters
position
feedbacksIntensity

Reimplemented from MoreMountains.FeedbacksForThirdParty.MMF_UIToolkit.

◆ CustomRestoreInitialValues()

override void MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitFloatBase.CustomRestoreInitialValues ( )
protectedvirtual

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

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomStopFeedback()

override void MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitFloatBase.CustomStopFeedback ( Vector3  position,
float  feedbacksIntensity = 1 
)
protectedvirtual

Stops the animation if needed

Parameters
position
feedbacksIntensity

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ GetInitialValue()

◆ SetValue()

Member Data Documentation

◆ _coroutine

Coroutine MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitFloatBase._coroutine
protected

◆ _initialValue

float MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitFloatBase._initialValue
protected

◆ AllowAdditivePlays

bool MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitFloatBase.AllowAdditivePlays = false

if this is true, calling that feedback will trigger it, even if it's in progress. If it's false, it'll prevent any new Play until the current one is over

◆ Curve

MMTweenType MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitFloatBase.Curve = new MMTweenType(MMTween.MMTweenCurve.EaseInCubic)

the curve to use when interpolating towards the destination value

◆ CurveRemapOne

float MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitFloatBase.CurveRemapOne = 1f

the value to which the curve's 1 should be remapped

◆ CurveRemapZero

float MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitFloatBase.CurveRemapZero = 0f

the value to which the curve's 0 should be remapped

◆ DestinationValue

float MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitFloatBase.DestinationValue = 1f

the value to aim towards when in ToDestination mode

◆ Duration

float MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitFloatBase.Duration = 0.2f

how long the color of the text should change over time

◆ HasCustomInspectors

override bool MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitFloatBase.HasCustomInspectors => true

◆ InstantValue

float MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitFloatBase.InstantValue = 1f

the value to apply when in instant mode

◆ Mode

Modes MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitFloatBase.Mode = Modes.Interpolate

the selected color mode : None : nothing will happen, gradient : evaluates the color over time on that gradient, from left to right, interpolate : lerps from the current color to the destination one

◆ RelativeValue

bool MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitFloatBase.RelativeValue = false

whether or not the value should be applied relatively to the initial value

Property Documentation

◆ FeedbackDuration

override float? MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitFloatBase.FeedbackDuration
getset

the duration of this feedback is the duration of the color transition, or 0 if instant


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