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

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

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

Public Attributes

MMPositionShaker TargetShaker
 a specific (and optional) shaker to target, regardless of its channel
float Duration = 0.5f
 the duration of the shake, in seconds
bool ResetShakerValuesAfterShake = true
 whether or not to reset shaker values after shake
bool ResetTargetValuesAfterShake = true
 whether or not to reset the target's values after shake
float ShakeSpeed = 20f
 the speed at which the transform should shake
float ShakeRange = 0.5f
 the maximum distance from its initial position the transform will move to during the shake
Vector3 ShakeMainDirection = Vector3.up
 the direction along which to shake the transform's position
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
Vector3 ShakeAltDirection = Vector3.up
 when in RandomizeDirection mode, a vector against which to randomize the main direction
bool RandomizeDirectionOnPlay = false
 if this is true, a new direction will be randomized every time a shake happens
bool RandomizeDirectionX = true
 whether or not to randomize the x value of the main direction
bool RandomizeDirectionY = true
 whether or not to randomize the y value of the main direction
bool RandomizeDirectionZ = true
 whether or not to randomize the z value of the main direction
bool AddDirectionalNoise = true
 whether or not to add noise to the main direction
Vector3 DirectionalNoiseStrengthMin = new Vector3(0.25f, 0.25f, 0.25f)
 when adding directional noise, noise strength will be randomized between this value and DirectionalNoiseStrengthMax
Vector3 DirectionalNoiseStrengthMax = new Vector3(0.25f, 0.25f, 0.25f)
 when adding directional noise, noise strength will be randomized between this value and DirectionalNoiseStrengthMin
Vector3 RandomnessSeed
 a unique seed you can use to get different outcomes when shaking more than one transform at once
bool RandomizeSeedOnShake = true
 whether or not to generate a unique seed automatically on every shake
bool UseAttenuation = true
 whether or not to use attenuation, which will impact the amplitude of the shake, along the defined curve
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

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)
 Triggers the corresponding coroutine.
override void CustomStopFeedback (Vector3 position, float feedbacksIntensity=1)
 On stop we stop our transition.
override void CustomRestoreInitialValues ()
 On restore, we restore our initial state.

Properties

override float FeedbackDuration [get, set]
 sets the inspector color for this feedback
override bool HasChannel [get]
override bool HasRandomness [get]
override bool HasRange [get]
override bool HasAutomatedTargetAcquisition [get]

Additional Inherited Members

Detailed Description

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

Member Function Documentation

◆ AutomateTargetAcquisition()

override void MoreMountains.Feedbacks.MMF_PositionShake.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_PositionShake.CustomPlayFeedback ( Vector3 position,
float feedbacksIntensity = 1::0f )
protected

Triggers the corresponding coroutine.

Parameters
position
feedbacksIntensity

◆ CustomRestoreInitialValues()

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

On restore, we restore our initial state.

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomStopFeedback()

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

On stop we stop our transition.

Parameters
position
feedbacksIntensity

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

Member Data Documentation

◆ AddDirectionalNoise

bool MoreMountains.Feedbacks.MMF_PositionShake.AddDirectionalNoise = true

whether or not to add noise to the main direction

◆ AttenuationCurve

AnimationCurve MoreMountains.Feedbacks.MMF_PositionShake.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_PositionShake.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_PositionShake.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_PositionShake.Duration = 0.5f

the duration of the shake, in seconds

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_PositionShake.FeedbackTypeAuthorized = true
static

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

◆ RandomizeDirection

bool MoreMountains.Feedbacks.MMF_PositionShake.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_PositionShake.RandomizeDirectionOnPlay = false

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

◆ RandomizeDirectionX

bool MoreMountains.Feedbacks.MMF_PositionShake.RandomizeDirectionX = true

whether or not to randomize the x value of the main direction

◆ RandomizeDirectionY

bool MoreMountains.Feedbacks.MMF_PositionShake.RandomizeDirectionY = true

whether or not to randomize the y value of the main direction

◆ RandomizeDirectionZ

bool MoreMountains.Feedbacks.MMF_PositionShake.RandomizeDirectionZ = true

whether or not to randomize the z value of the main direction

◆ RandomizeSeedOnShake

bool MoreMountains.Feedbacks.MMF_PositionShake.RandomizeSeedOnShake = true

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

◆ RandomnessSeed

Vector3 MoreMountains.Feedbacks.MMF_PositionShake.RandomnessSeed

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

◆ ResetShakerValuesAfterShake

bool MoreMountains.Feedbacks.MMF_PositionShake.ResetShakerValuesAfterShake = true

whether or not to reset shaker values after shake

◆ ResetTargetValuesAfterShake

bool MoreMountains.Feedbacks.MMF_PositionShake.ResetTargetValuesAfterShake = true

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

◆ ShakeAltDirection

Vector3 MoreMountains.Feedbacks.MMF_PositionShake.ShakeAltDirection = Vector3.up

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

◆ ShakeMainDirection

Vector3 MoreMountains.Feedbacks.MMF_PositionShake.ShakeMainDirection = Vector3.up

the direction along which to shake the transform's position

◆ ShakeRange

float MoreMountains.Feedbacks.MMF_PositionShake.ShakeRange = 0.5f

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

◆ ShakeSpeed

float MoreMountains.Feedbacks.MMF_PositionShake.ShakeSpeed = 20f

the speed at which the transform should shake

◆ TargetShaker

MMPositionShaker MoreMountains.Feedbacks.MMF_PositionShake.TargetShaker

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

◆ UseAttenuation

bool MoreMountains.Feedbacks.MMF_PositionShake.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_PositionShake.FeedbackDuration
getset

sets the inspector color for this feedback

returns the duration of the feedback

◆ HasAutomatedTargetAcquisition

override bool MoreMountains.Feedbacks.MMF_PositionShake.HasAutomatedTargetAcquisition
get

◆ HasChannel

override bool MoreMountains.Feedbacks.MMF_PositionShake.HasChannel
get

◆ HasRandomness

override bool MoreMountains.Feedbacks.MMF_PositionShake.HasRandomness
get

◆ HasRange

override bool MoreMountains.Feedbacks.MMF_PositionShake.HasRange
get

The documentation for this class was generated from the following file:
  • H:/Code/MoreMountains/topdownengine/Assets/TopDownEngine/ThirdParty/MoreMountains/MMFeedbacks/MMFeedbacks/Feedbacks/MMF_PositionShake.cs