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

This feedback lets you control the min and max anchors of a RectTransform over time. That's the normalized position in the parent RectTransform that the lower left and upper right corners are anchored to. More...

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

Public Attributes

RectTransform TargetRectTransform
 the target RectTransform to control
bool ModifyAnchorMin = true
 whether or not to modify the min anchor
MMTweenType AnchorMinCurve = new MMTweenType(new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1)))
 the curve to animate the min anchor on
Vector2 AnchorMinRemapZero = Vector2.zero
 the value to remap the min anchor curve's 0 on
Vector2 AnchorMinRemapOne = Vector2.one
 the value to remap the min anchor curve's 1 on
Vector2 DestinationAnchorMin = Vector2.zero
 the anchor min to reach when in ToDestination mode
bool ModifyAnchorMax = true
 whether or not to modify the max anchor
MMTweenType AnchorMaxCurve = new MMTweenType(new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1)))
 the curve to animate the max anchor on
Vector2 AnchorMaxRemapZero = Vector2.zero
 the value to remap the max anchor curve's 0 on
Vector2 AnchorMaxRemapOne = Vector2.one
 the value to remap the max anchor curve's 1 on
Vector2 DestinationAnchorMax = Vector2.one
 the anchor max 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 anchors.
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 AnchorToDestinationCo (float feedbacksIntensity, Vector3 position)
 Coroutine that lerps the anchors from their current values to the destination values.
override void CustomRestoreInitialValues ()
 On restore, we put our object back at its initial anchors.
override void FillTargets ()

Protected Attributes

Vector2 _initialAnchorMin
Vector2 _initialAnchorMax
Vector2 _newMinValue
Vector2 _newMaxValue

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 min and max anchors of a RectTransform over time. That's the normalized position in the parent RectTransform that the lower left and upper right corners are anchored to.

Member Function Documentation

◆ AnchorToDestinationCo()

virtual IEnumerator MoreMountains.Feedbacks.MMF_RectTransformAnchor.AnchorToDestinationCo ( float feedbacksIntensity,
Vector3 position )
protectedvirtual

Coroutine that lerps the anchors from their current values to the destination values.

◆ AutomateTargetAcquisition()

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

On init we store our initial anchors.

Parameters
owner

Reimplemented from MoreMountains.Feedbacks.MMF_FeedbackBase.

◆ CustomPlayFeedback()

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

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

Reimplemented from MoreMountains.Feedbacks.MMF_FeedbackBase.

◆ FillTargets()

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

Member Data Documentation

◆ _initialAnchorMax

Vector2 MoreMountains.Feedbacks.MMF_RectTransformAnchor._initialAnchorMax
protected

◆ _initialAnchorMin

Vector2 MoreMountains.Feedbacks.MMF_RectTransformAnchor._initialAnchorMin
protected

◆ _newMaxValue

Vector2 MoreMountains.Feedbacks.MMF_RectTransformAnchor._newMaxValue
protected

◆ _newMinValue

Vector2 MoreMountains.Feedbacks.MMF_RectTransformAnchor._newMinValue
protected

◆ AnchorMaxCurve

MMTweenType MoreMountains.Feedbacks.MMF_RectTransformAnchor.AnchorMaxCurve = new MMTweenType(new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1)))

the curve to animate the max anchor on

◆ AnchorMaxRemapOne

Vector2 MoreMountains.Feedbacks.MMF_RectTransformAnchor.AnchorMaxRemapOne = Vector2.one

the value to remap the max anchor curve's 1 on

◆ AnchorMaxRemapZero

Vector2 MoreMountains.Feedbacks.MMF_RectTransformAnchor.AnchorMaxRemapZero = Vector2.zero

the value to remap the max anchor curve's 0 on

◆ AnchorMinCurve

MMTweenType MoreMountains.Feedbacks.MMF_RectTransformAnchor.AnchorMinCurve = new MMTweenType(new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1)))

the curve to animate the min anchor on

◆ AnchorMinRemapOne

Vector2 MoreMountains.Feedbacks.MMF_RectTransformAnchor.AnchorMinRemapOne = Vector2.one

the value to remap the min anchor curve's 1 on

◆ AnchorMinRemapZero

Vector2 MoreMountains.Feedbacks.MMF_RectTransformAnchor.AnchorMinRemapZero = Vector2.zero

the value to remap the min anchor curve's 0 on

◆ DestinationAnchorMax

Vector2 MoreMountains.Feedbacks.MMF_RectTransformAnchor.DestinationAnchorMax = Vector2.one

the anchor max to reach when in ToDestination mode

◆ DestinationAnchorMin

Vector2 MoreMountains.Feedbacks.MMF_RectTransformAnchor.DestinationAnchorMin = Vector2.zero

the anchor min to reach when in ToDestination mode

◆ ModifyAnchorMax

bool MoreMountains.Feedbacks.MMF_RectTransformAnchor.ModifyAnchorMax = true

whether or not to modify the max anchor

◆ ModifyAnchorMin

bool MoreMountains.Feedbacks.MMF_RectTransformAnchor.ModifyAnchorMin = true

whether or not to modify the min anchor

◆ TargetRectTransform

RectTransform MoreMountains.Feedbacks.MMF_RectTransformAnchor.TargetRectTransform

the target RectTransform to control

Property Documentation

◆ CanForceInitialValue

override bool MoreMountains.Feedbacks.MMF_RectTransformAnchor.CanForceInitialValue
get

◆ HasAutomatedTargetAcquisition

override bool MoreMountains.Feedbacks.MMF_RectTransformAnchor.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_RectTransformAnchor.cs