Corgi Engine v10.1
Loading...
Searching...
No Matches
MoreMountains.Feedbacks.MMF_RectTransformPivot Class Reference

This feedback lets you control the position of a RectTransform's pivot over time. More...

Inheritance diagram for MoreMountains.Feedbacks.MMF_RectTransformPivot:
MoreMountains.Feedbacks.MMF_FeedbackBase MoreMountains.Feedbacks.MMF_Feedback

Public Attributes

RectTransform TargetRectTransform
 the RectTransform whose position you want to control over time
MMTweenType SpeedCurve = new MMTweenType(new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1)))
 The curve along which to evaluate the position of the RectTransform's pivot.
Vector2 RemapZero = Vector2.zero
 the position to remap the curve's 0 to, randomized between its min and max - put the same value in both min and max if you don't want any randomness
Vector2 RemapOne = Vector2.one
 the position to remap the curve's 1 to, randomized between its min and max - put the same value in both min and max if you don't want any randomness
Vector2 DestinationPivot = new Vector2(0.5f, 0.5f)
 the pivot to reach when in ToDestination mode

Protected Member Functions

override void AutomateTargetAcquisition ()
 A method meant to be implemented per feedback letting you specify what happens (usually setting a target)
override void CustomInitialization (MMF_Player owner)
 On init we store our initial pivot.
override void CustomPlayFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 On Play we handle ToDestination mode ourselves, and delegate other modes to the base class.
virtual IEnumerator PivotToDestinationCo (float feedbacksIntensity, Vector3 position)
 Coroutine that lerps the pivot from its current value to the destination value.
override void CustomRestoreInitialValues ()
 On restore, we put our object back at its initial pivot.
override void FillTargets ()

Protected Attributes

Vector2 _initialPivot
Vector2 _newValue

Properties

override bool HasAutomatedTargetAcquisition [get]
 sets the inspector color for this feedback
override bool CanForceInitialValue [get]

Additional Inherited Members

 the possible modes for this feedback More...

Detailed Description

This feedback lets you control the position of a RectTransform's pivot over time.

Member Function Documentation

◆ AutomateTargetAcquisition()

override void MoreMountains.Feedbacks.MMF_RectTransformPivot.AutomateTargetAcquisition ( )
protectedvirtual

A method meant to be implemented per feedback letting you specify what happens (usually setting a target)

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomInitialization()

override void MoreMountains.Feedbacks.MMF_RectTransformPivot.CustomInitialization ( MMF_Player owner)
protectedvirtual

On init we store our initial pivot.

Parameters
owner

Reimplemented from MoreMountains.Feedbacks.MMF_FeedbackBase.

◆ CustomPlayFeedback()

override void MoreMountains.Feedbacks.MMF_RectTransformPivot.CustomPlayFeedback ( Vector3 position,
float feedbacksIntensity = 1::0f )
protected

On Play we handle ToDestination mode ourselves, and delegate other modes to the base class.

◆ CustomRestoreInitialValues()

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

On restore, we put our object back at its initial pivot.

Reimplemented from MoreMountains.Feedbacks.MMF_FeedbackBase.

◆ FillTargets()

override void MoreMountains.Feedbacks.MMF_RectTransformPivot.FillTargets ( )
protected

◆ PivotToDestinationCo()

virtual IEnumerator MoreMountains.Feedbacks.MMF_RectTransformPivot.PivotToDestinationCo ( float feedbacksIntensity,
Vector3 position )
protectedvirtual

Coroutine that lerps the pivot from its current value to the destination value.

Member Data Documentation

◆ _initialPivot

Vector2 MoreMountains.Feedbacks.MMF_RectTransformPivot._initialPivot
protected

◆ _newValue

Vector2 MoreMountains.Feedbacks.MMF_RectTransformPivot._newValue
protected

◆ DestinationPivot

Vector2 MoreMountains.Feedbacks.MMF_RectTransformPivot.DestinationPivot = new Vector2(0.5f, 0.5f)

the pivot to reach when in ToDestination mode

◆ RemapOne

Vector2 MoreMountains.Feedbacks.MMF_RectTransformPivot.RemapOne = Vector2.one

the position to remap the curve's 1 to, randomized between its min and max - put the same value in both min and max if you don't want any randomness

◆ RemapZero

Vector2 MoreMountains.Feedbacks.MMF_RectTransformPivot.RemapZero = Vector2.zero

the position to remap the curve's 0 to, randomized between its min and max - put the same value in both min and max if you don't want any randomness

◆ SpeedCurve

MMTweenType MoreMountains.Feedbacks.MMF_RectTransformPivot.SpeedCurve = new MMTweenType(new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1)))

The curve along which to evaluate the position of the RectTransform's pivot.

◆ TargetRectTransform

RectTransform MoreMountains.Feedbacks.MMF_RectTransformPivot.TargetRectTransform

the RectTransform whose position you want to control over time

Property Documentation

◆ CanForceInitialValue

override bool MoreMountains.Feedbacks.MMF_RectTransformPivot.CanForceInitialValue
get

◆ HasAutomatedTargetAcquisition

override bool MoreMountains.Feedbacks.MMF_RectTransformPivot.HasAutomatedTargetAcquisition
get

sets the inspector color for this feedback


The documentation for this class was generated from the following file:
  • Assets/CorgiEngine/ThirdParty/MoreMountains/MMFeedbacks/MMFeedbacksForThirdParty/MMTools/Feedbacks/MMF_RectTransformPivot.cs