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

This feedback lets you emit a ScaleShake event. This will be caught by MMScaleShakers (on the specified channel). Scale shakers, as the name suggests, are used to shake the scale of a transform, along a direction, with optional noise and other fine control options. More...

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

Public Attributes

override bool HasChannel => true
 
override bool HasRandomness => true
 
override bool HasRange => true
 
override bool HasAutomatedTargetAcquisition => true
 
MMScaleShaker TargetShaker
 a specific (and optional) shaker to target, regardless of its channel More...
 
float Duration = 0.5f
 the duration of the shake, in seconds More...
 
bool ResetShakerValuesAfterShake = true
 whether or not to reset shaker values after shake More...
 
bool ResetTargetValuesAfterShake = true
 whether or not to reset the target's values after shake More...
 
float ShakeSpeed = 20f
 the speed at which the transform should shake More...
 
float ShakeRange = 0.5f
 the maximum distance from its initial scale the transform will move to during the shake More...
 
Vector3 ShakeMainDirection = Vector3.up
 the direction along which to shake the transform's scale More...
 
bool RandomizeDirection = false
 if this is true, instead of using ShakeMainDirection as the direction of the shake, a random vector3 will be generated, randomized between ShakeMainDirection and ShakeAltDirection More...
 
Vector3 ShakeAltDirection = Vector3.up
 when in RandomizeDirection mode, a vector against which to randomize the main direction More...
 
bool RandomizeDirectionOnPlay = false
 if this is true, a new direction will be randomized every time a shake happens More...
 
bool AddDirectionalNoise = true
 whether or not to add noise to the main direction More...
 
Vector3 DirectionalNoiseStrengthMin = new Vector3(0.25f, 0.25f, 0.25f)
 when adding directional noise, noise strength will be randomized between this value and DirectionalNoiseStrengthMax More...
 
Vector3 DirectionalNoiseStrengthMax = new Vector3(0.25f, 0.25f, 0.25f)
 when adding directional noise, noise strength will be randomized between this value and DirectionalNoiseStrengthMin More...
 
Vector3 RandomnessSeed
 a unique seed you can use to get different outcomes when shaking more than one transform at once More...
 
bool RandomizeSeedOnShake = true
 whether or not to generate a unique seed automatically on every shake More...
 
bool UseAttenuation = true
 whether or not to use attenuation, which will impact the amplitude of the shake, along the defined curve More...
 
AnimationCurve AttenuationCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.5f, 1), new Keyframe(1, 0))
 the animation curve used to define attenuation, impacting the amplitude of the shake 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 CustomPlayFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 Triggers the corresponding coroutine More...
 
override void CustomStopFeedback (Vector3 position, float feedbacksIntensity=1)
 On stop we stop our transition More...
 
override void CustomRestoreInitialValues ()
 On restore, we restore our initial state More...
 

Properties

override float FeedbackDuration [get, set]
 sets the inspector color for this feedback More...
 

Additional Inherited Members

Detailed Description

This feedback lets you emit a ScaleShake event. This will be caught by MMScaleShakers (on the specified channel). Scale shakers, as the name suggests, are used to shake the scale of a transform, along a direction, with optional noise and other fine control options.

Member Function Documentation

◆ AutomateTargetAcquisition()

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

◆ CustomPlayFeedback()

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

Triggers the corresponding coroutine

Parameters
scale
feedbacksIntensity

Implements MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomRestoreInitialValues()

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

On restore, we restore our initial state

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomStopFeedback()

override void MoreMountains.Feedbacks.MMF_ScaleShake.CustomStopFeedback ( Vector3  position,
float  feedbacksIntensity = 1 
)
protectedvirtual

On stop we stop our transition

Parameters
scale
feedbacksIntensity

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

Member Data Documentation

◆ AddDirectionalNoise

bool MoreMountains.Feedbacks.MMF_ScaleShake.AddDirectionalNoise = true

whether or not to add noise to the main direction

◆ AttenuationCurve

AnimationCurve MoreMountains.Feedbacks.MMF_ScaleShake.AttenuationCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.5f, 1), new Keyframe(1, 0))

the animation curve used to define attenuation, impacting the amplitude of the shake

◆ DirectionalNoiseStrengthMax

Vector3 MoreMountains.Feedbacks.MMF_ScaleShake.DirectionalNoiseStrengthMax = new Vector3(0.25f, 0.25f, 0.25f)

when adding directional noise, noise strength will be randomized between this value and DirectionalNoiseStrengthMin

◆ DirectionalNoiseStrengthMin

Vector3 MoreMountains.Feedbacks.MMF_ScaleShake.DirectionalNoiseStrengthMin = new Vector3(0.25f, 0.25f, 0.25f)

when adding directional noise, noise strength will be randomized between this value and DirectionalNoiseStrengthMax

◆ Duration

float MoreMountains.Feedbacks.MMF_ScaleShake.Duration = 0.5f

the duration of the shake, in seconds

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_ScaleShake.FeedbackTypeAuthorized = true
static

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

◆ HasAutomatedTargetAcquisition

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

◆ HasChannel

override bool MoreMountains.Feedbacks.MMF_ScaleShake.HasChannel => true

◆ HasRandomness

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

◆ HasRange

override bool MoreMountains.Feedbacks.MMF_ScaleShake.HasRange => true

◆ RandomizeDirection

bool MoreMountains.Feedbacks.MMF_ScaleShake.RandomizeDirection = false

if this is true, instead of using ShakeMainDirection as the direction of the shake, a random vector3 will be generated, randomized between ShakeMainDirection and ShakeAltDirection

◆ RandomizeDirectionOnPlay

bool MoreMountains.Feedbacks.MMF_ScaleShake.RandomizeDirectionOnPlay = false

if this is true, a new direction will be randomized every time a shake happens

◆ RandomizeSeedOnShake

bool MoreMountains.Feedbacks.MMF_ScaleShake.RandomizeSeedOnShake = true

whether or not to generate a unique seed automatically on every shake

◆ RandomnessSeed

Vector3 MoreMountains.Feedbacks.MMF_ScaleShake.RandomnessSeed

a unique seed you can use to get different outcomes when shaking more than one transform at once

◆ ResetShakerValuesAfterShake

bool MoreMountains.Feedbacks.MMF_ScaleShake.ResetShakerValuesAfterShake = true

whether or not to reset shaker values after shake

◆ ResetTargetValuesAfterShake

bool MoreMountains.Feedbacks.MMF_ScaleShake.ResetTargetValuesAfterShake = true

whether or not to reset the target's values after shake

◆ ShakeAltDirection

Vector3 MoreMountains.Feedbacks.MMF_ScaleShake.ShakeAltDirection = Vector3.up

when in RandomizeDirection mode, a vector against which to randomize the main direction

◆ ShakeMainDirection

Vector3 MoreMountains.Feedbacks.MMF_ScaleShake.ShakeMainDirection = Vector3.up

the direction along which to shake the transform's scale

◆ ShakeRange

float MoreMountains.Feedbacks.MMF_ScaleShake.ShakeRange = 0.5f

the maximum distance from its initial scale the transform will move to during the shake

◆ ShakeSpeed

float MoreMountains.Feedbacks.MMF_ScaleShake.ShakeSpeed = 20f

the speed at which the transform should shake

◆ TargetShaker

MMScaleShaker MoreMountains.Feedbacks.MMF_ScaleShake.TargetShaker

a specific (and optional) shaker to target, regardless of its channel

◆ UseAttenuation

bool MoreMountains.Feedbacks.MMF_ScaleShake.UseAttenuation = true

whether or not to use attenuation, which will impact the amplitude of the shake, along the defined curve

Property Documentation

◆ FeedbackDuration

override float MoreMountains.Feedbacks.MMF_ScaleShake.FeedbackDuration
getset

sets the inspector color for this feedback

returns the duration of the feedback


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