TopDown Engine v5.0
Loading...
Searching...
No Matches
MoreMountains.Feedbacks.MMF_RectTransformSizeDelta Class Reference

This feedback lets you control the size delta property (the size of this RectTransform relative to the distances between the anchors) of a RectTransform, over time. More...

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

Public Attributes

RectTransform TargetRectTransform
 the rect transform we want to impact
MMTweenType SpeedCurve = new MMTweenType(new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1)))
 the speed at which we should animate the size delta
Vector2 RemapZero = Vector2.zero
 the value 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 value 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 DestinationSizeDelta = new Vector2(100f, 100f)
 the size delta 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 size delta.
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 SizeDeltaToDestinationCo (float feedbacksIntensity, Vector3 position)
 Coroutine that lerps the sizeDelta from its current value to the destination value.
override void CustomRestoreInitialValues ()
 On restore, we put our object back at its initial size delta.
override void FillTargets ()

Protected Attributes

Vector2 _initialSizeDelta
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 size delta property (the size of this RectTransform relative to the distances between the anchors) of a RectTransform, over time.

Member Function Documentation

◆ AutomateTargetAcquisition()

override void MoreMountains.Feedbacks.MMF_RectTransformSizeDelta.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_RectTransformSizeDelta.CustomInitialization ( MMF_Player owner)
protectedvirtual

On init we store our initial size delta.

Parameters
owner

Reimplemented from MoreMountains.Feedbacks.MMF_FeedbackBase.

◆ CustomPlayFeedback()

override void MoreMountains.Feedbacks.MMF_RectTransformSizeDelta.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_RectTransformSizeDelta.CustomRestoreInitialValues ( )
protectedvirtual

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

Reimplemented from MoreMountains.Feedbacks.MMF_FeedbackBase.

◆ FillTargets()

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

◆ SizeDeltaToDestinationCo()

virtual IEnumerator MoreMountains.Feedbacks.MMF_RectTransformSizeDelta.SizeDeltaToDestinationCo ( float feedbacksIntensity,
Vector3 position )
protectedvirtual

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

Member Data Documentation

◆ _initialSizeDelta

Vector2 MoreMountains.Feedbacks.MMF_RectTransformSizeDelta._initialSizeDelta
protected

◆ _newValue

Vector2 MoreMountains.Feedbacks.MMF_RectTransformSizeDelta._newValue
protected

◆ DestinationSizeDelta

Vector2 MoreMountains.Feedbacks.MMF_RectTransformSizeDelta.DestinationSizeDelta = new Vector2(100f, 100f)

the size delta to reach when in ToDestination mode

◆ RemapOne

Vector2 MoreMountains.Feedbacks.MMF_RectTransformSizeDelta.RemapOne = Vector2.one

the value 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_RectTransformSizeDelta.RemapZero = Vector2.zero

the value 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_RectTransformSizeDelta.SpeedCurve = new MMTweenType(new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1)))

the speed at which we should animate the size delta

◆ TargetRectTransform

RectTransform MoreMountains.Feedbacks.MMF_RectTransformSizeDelta.TargetRectTransform

the rect transform we want to impact

Property Documentation

◆ CanForceInitialValue

override bool MoreMountains.Feedbacks.MMF_RectTransformSizeDelta.CanForceInitialValue
get

◆ HasAutomatedTargetAcquisition

override bool MoreMountains.Feedbacks.MMF_RectTransformSizeDelta.HasAutomatedTargetAcquisition
get

sets the inspector color for this feedback


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