TopDown Engine v4.5
Loading...
Searching...
No Matches
MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitVector2Base Class Reference

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

Inheritance diagram for MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitVector2Base:
MoreMountains.FeedbacksForThirdParty.MMF_UIToolkit MoreMountains.Feedbacks.MMF_Feedback MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitScale MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitSize MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitTransformOrigin MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitTranslate

Public Types

enum  Modes { Instant , Interpolate , 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 { Name , Class }

Public Member Functions

override void OnValidate ()
 On Validate, we init our curves conditions if needed.

Public Attributes

Modes Mode = Modes.Interpolate
bool RelativeValues = false
 whether or not the value should be applied relatively to the initial value
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
float Duration = 0.2f
 how long the color of the text should change over time
Vector2 InstantValue = new Vector2(1f, 1f)
 the value to apply when in instant mode
bool AnimateX = true
 whether or not to animate the x value
MMTweenType CurveX = new MMTweenType(MMTween.MMTweenCurve.EaseInCubic, "", "Mode", (int)Modes.Interpolate, (int)Modes.ToDestination)
 the curve to use when interpolating towards the destination value
float CurveRemapZeroX = 0f
 the value to which the curve's 0 should be remapped
float CurveRemapOneX = 1f
 the value to which the curve's 1 should be remapped
float DestinationValueX = 1f
 the value to aim towards when in ToDestination mode
bool AnimateY = true
 whether or not to animate the y value
MMTweenType CurveY = new MMTweenType(MMTween.MMTweenCurve.EaseInCubic, "", "Mode", (int)Modes.Interpolate, (int)Modes.ToDestination)
 the curve to use when interpolating towards the destination value
float CurveRemapZeroY = 0f
 the value to which the curve's 0 should be remapped
float CurveRemapOneY = 1f
 the value to which the curve's 1 should be remapped
float DestinationValueY = 1f
 the value to aim towards when in ToDestination mode
Public Attributes inherited from MoreMountains.FeedbacksForThirdParty.MMF_UIToolkit
UIDocument TargetDocument
 the UI document on which to make modifications
QueryModes QueryMode = QueryModes.Name
 the way to perform the query, either via element name or via class
string Query = "ButtonA"
 the query to perform (replace this with your own element name or class)
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.

Protected Member Functions

override void CustomInitialization (MMF_Player owner)
 On init we store our initial value.
override void CustomPlayFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 On Play we change our text's alpha.
virtual IEnumerator ChangeValue ()
 Changes the color of the text over time.
override void CustomStopFeedback (Vector3 position, float feedbacksIntensity=1)
 Stops the animation if needed.
virtual void ApplyTime (float time)
 Applies the alpha change.
virtual void SetValue (Vector2 newValue)
virtual Vector2 GetInitialValue ()
override void CustomRestoreInitialValues ()
 On restore, we put our object back at its initial position.
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)
override void CustomPlayFeedback (Vector3 position, float feedbacksIntensity=1)
virtual void PerformQuery ()
 Performs the query and sets _visualElements with the result.
virtual void HandleMarkDirty (VisualElement element)

Protected Attributes

Vector2 _initialValue
Coroutine _coroutine
Vector2 _newValue
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
override bool HasCustomInspectors [get]
Properties inherited from MoreMountains.FeedbacksForThirdParty.MMF_UIToolkit
override bool HasAutomatedTargetAcquisition [get]
 sets the inspector color for this feedback

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

Detailed Description

A base feedback to set a vector2 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_UIToolkitVector2Base.ApplyTime ( float time)
protectedvirtual

Applies the alpha change.

Parameters
time

◆ ChangeValue()

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

Changes the color of the text over time.

Returns

◆ CustomInitialization()

override void MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitVector2Base.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_UIToolkitVector2Base.CustomPlayFeedback ( Vector3 position,
float feedbacksIntensity = 1::0f )
protected

On Play we change our text's alpha.

Parameters
position
feedbacksIntensity

◆ CustomRestoreInitialValues()

override void MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitVector2Base.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_UIToolkitVector2Base.CustomStopFeedback ( Vector3 position,
float feedbacksIntensity = 1 )
protectedvirtual

Stops the animation if needed.

Parameters
position
feedbacksIntensity

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ GetInitialValue()

◆ OnValidate()

override void MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitVector2Base.OnValidate ( )
virtual

On Validate, we init our curves conditions if needed.

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ SetValue()

Member Data Documentation

◆ _coroutine

Coroutine MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitVector2Base._coroutine
protected

◆ _initialValue

Vector2 MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitVector2Base._initialValue
protected

◆ _newValue

Vector2 MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitVector2Base._newValue
protected

◆ AllowAdditivePlays

bool MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitVector2Base.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

◆ AnimateX

bool MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitVector2Base.AnimateX = true

whether or not to animate the x value

◆ AnimateY

bool MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitVector2Base.AnimateY = true

whether or not to animate the y value

◆ CurveRemapOneX

float MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitVector2Base.CurveRemapOneX = 1f

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

◆ CurveRemapOneY

float MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitVector2Base.CurveRemapOneY = 1f

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

◆ CurveRemapZeroX

float MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitVector2Base.CurveRemapZeroX = 0f

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

◆ CurveRemapZeroY

float MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitVector2Base.CurveRemapZeroY = 0f

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

◆ CurveX

MMTweenType MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitVector2Base.CurveX = new MMTweenType(MMTween.MMTweenCurve.EaseInCubic, "", "Mode", (int)Modes.Interpolate, (int)Modes.ToDestination)

the curve to use when interpolating towards the destination value

◆ CurveY

MMTweenType MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitVector2Base.CurveY = new MMTweenType(MMTween.MMTweenCurve.EaseInCubic, "", "Mode", (int)Modes.Interpolate, (int)Modes.ToDestination)

the curve to use when interpolating towards the destination value

◆ DestinationValueX

float MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitVector2Base.DestinationValueX = 1f

the value to aim towards when in ToDestination mode

◆ DestinationValueY

float MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitVector2Base.DestinationValueY = 1f

the value to aim towards when in ToDestination mode

◆ Duration

float MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitVector2Base.Duration = 0.2f

how long the color of the text should change over time

◆ InstantValue

Vector2 MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitVector2Base.InstantValue = new Vector2(1f, 1f)

the value to apply when in instant mode

◆ Mode

Modes MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitVector2Base.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

◆ RelativeValues

bool MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitVector2Base.RelativeValues = false

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

Property Documentation

◆ FeedbackDuration

override float MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitVector2Base.FeedbackDuration
getset

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

◆ HasCustomInspectors

override bool MoreMountains.FeedbacksForThirdParty.MMF_UIToolkitVector2Base.HasCustomInspectors
get

The documentation for this class was generated from the following file:
  • H:/Code/MoreMountains/topdownengine/Assets/TopDownEngine/ThirdParty/MoreMountains/MMFeedbacks/MMFeedbacksForThirdParty/UIToolkit/Base/MMF_UIToolkitVector2Base.cs