TopDown Engine v4.5
Loading...
Searching...
No Matches
MoreMountains.Feedbacks.MMF_AnimatorSpeed Class Reference

This feedback will let you change the speed of a target animator, either once, or instantly and then reset it, or interpolate it over time. More...

Inheritance diagram for MoreMountains.Feedbacks.MMF_AnimatorSpeed:
MoreMountains.Feedbacks.MMF_Feedback

Public Types

enum  SpeedModes { Once , InstantThenReset , OverTime }

Public Attributes

Animator BoundAnimator
 the animator whose parameters you want to update
SpeedModes Mode = SpeedModes.Once
 whether to change the speed of the target animator once, instantly and reset it later, or have it change over time
float NewSpeedMin = 0f
 the new minimum speed at which to set the animator - value will be randomized between min and max
float NewSpeedMax = 0f
 the new maximum speed at which to set the animator - value will be randomized between min and max
float Duration = 1f
 when in instant then reset or over time modes, the duration of the effect
AnimationCurve Curve = new AnimationCurve(new Keyframe(0, 0f), new Keyframe(0.5f, 1f), new Keyframe(1, 0f))
 when in over time mode, the curve against which to evaluate the new speed

Static Public Attributes

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

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 CustomPlayFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 On Play, checks if an animator is bound and triggers parameters.
virtual IEnumerator ChangeSpeedCo ()
 A coroutine used in ForDuration mode.
virtual float DetermineNewSpeed ()
 Determines the new speed for the target animator.
override void CustomStopFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 On stop, turns the bool parameter to false.
override void CustomRestoreInitialValues ()
 On restore, we restore our initial state.

Protected Attributes

Coroutine _coroutine
float _initialSpeed
float _startedAt

Properties

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

Additional Inherited Members

Detailed Description

This feedback will let you change the speed of a target animator, either once, or instantly and then reset it, or interpolate it over time.

Member Enumeration Documentation

◆ SpeedModes

Enumerator
Once 
InstantThenReset 
OverTime 

Member Function Documentation

◆ AutomateTargetAcquisition()

override void MoreMountains.Feedbacks.MMF_AnimatorSpeed.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.

◆ ChangeSpeedCo()

virtual IEnumerator MoreMountains.Feedbacks.MMF_AnimatorSpeed.ChangeSpeedCo ( )
protectedvirtual

A coroutine used in ForDuration mode.

Returns

◆ CustomPlayFeedback()

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

On Play, checks if an animator is bound and triggers parameters.

Parameters
position
feedbacksIntensity

◆ CustomRestoreInitialValues()

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

On restore, we restore our initial state.

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomStopFeedback()

override void MoreMountains.Feedbacks.MMF_AnimatorSpeed.CustomStopFeedback ( Vector3 position,
float feedbacksIntensity = 1::0f )
protectedvirtual

On stop, turns the bool parameter to false.

Parameters
position
feedbacksIntensity

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ DetermineNewSpeed()

virtual float MoreMountains.Feedbacks.MMF_AnimatorSpeed.DetermineNewSpeed ( )
protectedvirtual

Determines the new speed for the target animator.

Returns

Member Data Documentation

◆ _coroutine

Coroutine MoreMountains.Feedbacks.MMF_AnimatorSpeed._coroutine
protected

◆ _initialSpeed

float MoreMountains.Feedbacks.MMF_AnimatorSpeed._initialSpeed
protected

◆ _startedAt

float MoreMountains.Feedbacks.MMF_AnimatorSpeed._startedAt
protected

◆ BoundAnimator

Animator MoreMountains.Feedbacks.MMF_AnimatorSpeed.BoundAnimator

the animator whose parameters you want to update

◆ Curve

AnimationCurve MoreMountains.Feedbacks.MMF_AnimatorSpeed.Curve = new AnimationCurve(new Keyframe(0, 0f), new Keyframe(0.5f, 1f), new Keyframe(1, 0f))

when in over time mode, the curve against which to evaluate the new speed

◆ Duration

float MoreMountains.Feedbacks.MMF_AnimatorSpeed.Duration = 1f

when in instant then reset or over time modes, the duration of the effect

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_AnimatorSpeed.FeedbackTypeAuthorized = true
static

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

◆ Mode

SpeedModes MoreMountains.Feedbacks.MMF_AnimatorSpeed.Mode = SpeedModes.Once

whether to change the speed of the target animator once, instantly and reset it later, or have it change over time

◆ NewSpeedMax

float MoreMountains.Feedbacks.MMF_AnimatorSpeed.NewSpeedMax = 0f

the new maximum speed at which to set the animator - value will be randomized between min and max

◆ NewSpeedMin

float MoreMountains.Feedbacks.MMF_AnimatorSpeed.NewSpeedMin = 0f

the new minimum speed at which to set the animator - value will be randomized between min and max

Property Documentation

◆ CanForceInitialValue

override bool MoreMountains.Feedbacks.MMF_AnimatorSpeed.CanForceInitialValue
get

◆ HasAutomatedTargetAcquisition

override bool MoreMountains.Feedbacks.MMF_AnimatorSpeed.HasAutomatedTargetAcquisition
get

◆ HasRandomness

override bool MoreMountains.Feedbacks.MMF_AnimatorSpeed.HasRandomness
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/MMFeedbacks/Feedbacks/MMF_AnimatorSpeed.cs