Feel  4.0.1
The best way to improve your game's feel and make it extra juicy
MoreMountains.Feedbacks.MMF_Scale Class Reference

This feedback will animate the scale of the target object over time when played More...

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

Public Types

enum  Modes { Modes.Absolute, Modes.Additive, Modes.ToDestination }
 the possible modes this feedback can operate on More...
 
enum  TimeScales { TimeScales.Scaled, TimeScales.Unscaled }
 the possible timescales for the animation of the scale More...
 

Public Member Functions

override void OnDisable ()
 On disable we reset our coroutine More...
 
override void OnValidate ()
 On Validate, we migrate our deprecated animation curves to our tween types if needed More...
 

Public Attributes

override bool HasAutomatedTargetAcquisition => true
 sets the inspector color for this feedback More...
 
override bool CanForceInitialValue => true
 
Modes Mode = Modes.Absolute
 
Transform AnimateScaleTarget
 the object to animate More...
 
float AnimateScaleDuration = 0.2f
 the duration of the animation More...
 
float RemapCurveZero = 1f
 the value to remap the curve's 0 value to More...
 
float RemapCurveOne = 2f
 the value to remap the curve's 1 value to More...
 
float Offset = 0f
 how much should be added to the curve More...
 
bool AnimateX = true
 if this is true, should animate the X scale value More...
 
MMTweenType AnimateScaleTweenX = new MMTweenType( new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1.5f), new Keyframe(1, 0)))
 the x scale animation definition More...
 
bool AnimateY = true
 if this is true, should animate the Y scale value More...
 
MMTweenType AnimateScaleTweenY = new MMTweenType( new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1.5f), new Keyframe(1, 0)))
 the y scale animation definition More...
 
bool AnimateZ = true
 if this is true, should animate the z scale value More...
 
MMTweenType AnimateScaleTweenZ = new MMTweenType( new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1.5f), new Keyframe(1, 0)))
 the z scale animation definition More...
 
bool UniformScaling = false
 if this is true, the AnimateX curve only will be used, and applied to all axis More...
 
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 More...
 
bool DetermineScaleOnPlay = false
 if this is true, initial and destination scales will be recomputed on every play More...
 
Vector3 DestinationScale = new Vector3(0.5f, 0.5f, 0.5f)
 the scale to reach when in ToDestination mode More...
 
override bool HasRandomness => true
 
AnimationCurve AnimateScaleX = null
 [DEPRECATED] the x scale animation definition More...
 
AnimationCurve AnimateScaleY = null
 [DEPRECATED] the y scale animation definition More...
 
AnimationCurve AnimateScaleZ = null
 [DEPRECATED] the z scale animation definition More...
 

Static Public Attributes

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

Protected Member Functions

override void AutomateTargetAcquisition ()
 A method meant to be implemented per feedback letting you specify what happens (usually setting a target) More...
 
override void CustomInitialization (MMF_Player owner)
 On init we store our initial scale More...
 
virtual void GetInitialScale ()
 Stores initial scale for future use More...
 
override void CustomPlayFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 On Play, triggers the scale animation More...
 
virtual IEnumerator ScaleToDestination ()
 An internal coroutine used to scale the target to its destination scale More...
 
virtual IEnumerator AnimateScale (Transform targetTransform, Vector3 vector, float duration, MMTweenType curveX, MMTweenType curveY, MMTweenType curveZ, float remapCurveZero=0f, float remapCurveOne=1f)
 An internal coroutine used to animate the scale over time More...
 
override void CustomStopFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 On stop, we interrupt movement if it was active More...
 
override void CustomRestoreInitialValues ()
 On restore, we restore our initial state More...
 

Protected Attributes

Vector3 _initialScale
 
Vector3 _newScale
 
Coroutine _coroutine
 

Properties

override float FeedbackDuration [get, set]
 the duration of this feedback is the duration of the scale animation More...
 

Detailed Description

This feedback will animate the scale of the target object over time when played

Member Enumeration Documentation

◆ Modes

the possible modes this feedback can operate on

Enumerator
Absolute 
Additive 
ToDestination 

◆ TimeScales

the possible timescales for the animation of the scale

Enumerator
Scaled 
Unscaled 

Member Function Documentation

◆ AnimateScale()

virtual IEnumerator MoreMountains.Feedbacks.MMF_Scale.AnimateScale ( Transform  targetTransform,
Vector3  vector,
float  duration,
MMTweenType  curveX,
MMTweenType  curveY,
MMTweenType  curveZ,
float  remapCurveZero = 0f,
float  remapCurveOne = 1f 
)
protectedvirtual

An internal coroutine used to animate the scale over time

Parameters
targetTransform
vector
duration
curveX
curveY
curveZ
multiplier
Returns

◆ AutomateTargetAcquisition()

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

On init we store our initial scale

Parameters
owner

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomPlayFeedback()

override void MoreMountains.Feedbacks.MMF_Scale.CustomPlayFeedback ( Vector3  position,
float  feedbacksIntensity = 1.0f 
)
protectedvirtual

On Play, triggers the scale animation

Parameters
position
feedbacksIntensity

Implements MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomRestoreInitialValues()

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

On restore, we restore our initial state

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomStopFeedback()

override void MoreMountains.Feedbacks.MMF_Scale.CustomStopFeedback ( Vector3  position,
float  feedbacksIntensity = 1.0f 
)
protectedvirtual

On stop, we interrupt movement if it was active

Parameters
position
feedbacksIntensity

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ GetInitialScale()

virtual void MoreMountains.Feedbacks.MMF_Scale.GetInitialScale ( )
protectedvirtual

Stores initial scale for future use

◆ OnDisable()

override void MoreMountains.Feedbacks.MMF_Scale.OnDisable ( )
virtual

On disable we reset our coroutine

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ OnValidate()

override void MoreMountains.Feedbacks.MMF_Scale.OnValidate ( )
virtual

On Validate, we migrate our deprecated animation curves to our tween types if needed

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ ScaleToDestination()

virtual IEnumerator MoreMountains.Feedbacks.MMF_Scale.ScaleToDestination ( )
protectedvirtual

An internal coroutine used to scale the target to its destination scale

Returns

Member Data Documentation

◆ _coroutine

Coroutine MoreMountains.Feedbacks.MMF_Scale._coroutine
protected

◆ _initialScale

Vector3 MoreMountains.Feedbacks.MMF_Scale._initialScale
protected

◆ _newScale

Vector3 MoreMountains.Feedbacks.MMF_Scale._newScale
protected

◆ AllowAdditivePlays

bool MoreMountains.Feedbacks.MMF_Scale.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

◆ AnimateScaleDuration

float MoreMountains.Feedbacks.MMF_Scale.AnimateScaleDuration = 0.2f

the duration of the animation

◆ AnimateScaleTarget

Transform MoreMountains.Feedbacks.MMF_Scale.AnimateScaleTarget

the object to animate

◆ AnimateScaleTweenX

MMTweenType MoreMountains.Feedbacks.MMF_Scale.AnimateScaleTweenX = new MMTweenType( new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1.5f), new Keyframe(1, 0)))

the x scale animation definition

◆ AnimateScaleTweenY

MMTweenType MoreMountains.Feedbacks.MMF_Scale.AnimateScaleTweenY = new MMTweenType( new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1.5f), new Keyframe(1, 0)))

the y scale animation definition

◆ AnimateScaleTweenZ

MMTweenType MoreMountains.Feedbacks.MMF_Scale.AnimateScaleTweenZ = new MMTweenType( new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1.5f), new Keyframe(1, 0)))

the z scale animation definition

◆ AnimateScaleX

AnimationCurve MoreMountains.Feedbacks.MMF_Scale.AnimateScaleX = null

[DEPRECATED] the x scale animation definition

◆ AnimateScaleY

AnimationCurve MoreMountains.Feedbacks.MMF_Scale.AnimateScaleY = null

[DEPRECATED] the y scale animation definition

◆ AnimateScaleZ

AnimationCurve MoreMountains.Feedbacks.MMF_Scale.AnimateScaleZ = null

[DEPRECATED] the z scale animation definition

◆ AnimateX

bool MoreMountains.Feedbacks.MMF_Scale.AnimateX = true

if this is true, should animate the X scale value

◆ AnimateY

bool MoreMountains.Feedbacks.MMF_Scale.AnimateY = true

if this is true, should animate the Y scale value

◆ AnimateZ

bool MoreMountains.Feedbacks.MMF_Scale.AnimateZ = true

if this is true, should animate the z scale value

◆ CanForceInitialValue

override bool MoreMountains.Feedbacks.MMF_Scale.CanForceInitialValue => true

◆ DestinationScale

Vector3 MoreMountains.Feedbacks.MMF_Scale.DestinationScale = new Vector3(0.5f, 0.5f, 0.5f)

the scale to reach when in ToDestination mode

◆ DetermineScaleOnPlay

bool MoreMountains.Feedbacks.MMF_Scale.DetermineScaleOnPlay = false

if this is true, initial and destination scales will be recomputed on every play

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_Scale.FeedbackTypeAuthorized = true
static

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

◆ HasAutomatedTargetAcquisition

override bool MoreMountains.Feedbacks.MMF_Scale.HasAutomatedTargetAcquisition => true

sets the inspector color for this feedback

◆ HasRandomness

override bool MoreMountains.Feedbacks.MMF_Scale.HasRandomness => true

◆ Mode

Modes MoreMountains.Feedbacks.MMF_Scale.Mode = Modes.Absolute

the mode this feedback should operate on Absolute : follows the curve Additive : adds to the current scale of the target ToDestination : sets the scale to the destination target, whatever the current scale is

◆ Offset

float MoreMountains.Feedbacks.MMF_Scale.Offset = 0f

how much should be added to the curve

◆ RemapCurveOne

float MoreMountains.Feedbacks.MMF_Scale.RemapCurveOne = 2f

the value to remap the curve's 1 value to

◆ RemapCurveZero

float MoreMountains.Feedbacks.MMF_Scale.RemapCurveZero = 1f

the value to remap the curve's 0 value to

◆ UniformScaling

bool MoreMountains.Feedbacks.MMF_Scale.UniformScaling = false

if this is true, the AnimateX curve only will be used, and applied to all axis

Property Documentation

◆ FeedbackDuration

override float MoreMountains.Feedbacks.MMF_Scale.FeedbackDuration
getset

the duration of this feedback is the duration of the scale animation


The documentation for this class was generated from the following file: