Infinite Runner Engine v1.9
Public Types | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
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 { Absolute , Additive , ToDestination }
 the possible modes this feedback can operate on More...
 
enum  TimeScales { Scaled , Unscaled }
 the possible timescales for the animation of the scale More...
 

Public Attributes

Modes Mode = Modes.Absolute
 sets the inspector color for this feedback More...
 
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...
 
AnimationCurve AnimateScaleX = 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...
 
AnimationCurve AnimateScaleY = 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...
 
AnimationCurve AnimateScaleZ = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1.5f), new Keyframe(1, 0))
 the z scale animation definition 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...
 

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 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, AnimationCurve curveX, AnimationCurve curveY, AnimationCurve 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...
 
virtual void OnDisable ()
 On disable we reset our coroutine More...
 

Protected Attributes

Vector3 _initialScale
 
Vector3 _newScale
 
Coroutine _coroutine
 

Properties

override float FeedbackDuration [getset]
 the duration of this feedback is the duration of the scale animation More...
 

Additional Inherited Members

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,
AnimationCurve  curveX,
AnimationCurve  curveY,
AnimationCurve  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

◆ 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.

◆ 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()

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

On disable we reset our coroutine

◆ 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

◆ AnimateScaleX

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

the x scale animation definition

◆ AnimateScaleY

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

the y scale animation definition

◆ AnimateScaleZ

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

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

◆ 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

◆ Mode

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

sets the inspector color for this feedback

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

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: