TopDown Engine v5.0
Loading...
Searching...
No Matches
MoreMountains.FeedbacksForThirdParty.MMCinemachineCameraShaker Class Reference

Add this component to your Cinemachine Camera to have it shake when calling its ShakeCamera methods. More...

Inheritance diagram for MoreMountains.FeedbacksForThirdParty.MMCinemachineCameraShaker:

Public Member Functions

virtual float GetTime ()
virtual float GetDeltaTime ()
virtual void ShakeCamera (float duration, bool infinite, bool useUnscaledTime=false)
 Use this method to shake the camera for the specified duration (in seconds) with the default amplitude and frequency.
virtual void ShakeCamera (float duration, float amplitude, float frequency, bool infinite, bool useUnscaledTime=false)
 Use this method to shake the camera for the specified duration (in seconds), amplitude and frequency.
virtual void CameraReset ()
 Resets the camera's noise values to their idle values.
virtual void OnCameraShakeEvent (float duration, float amplitude, float frequency, float amplitudeX, float amplitudeY, float amplitudeZ, bool infinite, MMChannelData channelData, bool useUnscaledTime)
virtual void OnCameraShakeStopEvent (MMChannelData channelData)

Public Attributes

MMChannelModes ChannelMode = MMChannelModes.Int
int Channel = 0
 the channel to listen to - has to match the one on the feedback
MMChannel MMChannelDefinition = null
float DefaultShakeAmplitude = .5f
 The default amplitude that will be applied to your shakes if you don't specify one.
float DefaultShakeFrequency = 10f
 The default frequency that will be applied to your shakes if you don't specify one.
float IdleAmplitude
 the amplitude of the camera's noise when it's idle
float IdleFrequency = 1f
 the frequency of the camera's noise when it's idle
float LerpSpeed = 5f
 the speed at which to interpolate the shake
float TestDuration = 0.3f
 a duration (in seconds) to apply when testing this shake via the TestShake button
float TestAmplitude = 2f
 the amplitude to apply when testing this shake via the TestShake button
float TestFrequency = 20f
 the frequency to apply when testing this shake via the TestShake button
bool TestShakeButton

Protected Member Functions

virtual void Awake ()
 On awake we grab our components.
virtual void Start ()
 On Start we reset our camera to apply our base amplitude and frequency.
virtual void Update ()
virtual IEnumerator ShakeCameraCo (float duration, float amplitude, float frequency, bool infinite, bool useUnscaledTime)
 This coroutine will shake the.
virtual void OnEnable ()
virtual void OnDisable ()
virtual void TestShake ()

Protected Attributes

TimescaleModes _timescaleMode
Vector3 _initialPosition
Quaternion _initialRotation
float _targetAmplitude
float _targetFrequency

Detailed Description

Add this component to your Cinemachine Camera to have it shake when calling its ShakeCamera methods.

Member Function Documentation

◆ Awake()

virtual void MoreMountains.FeedbacksForThirdParty.MMCinemachineCameraShaker.Awake ( )
protectedvirtual

On awake we grab our components.

◆ CameraReset()

virtual void MoreMountains.FeedbacksForThirdParty.MMCinemachineCameraShaker.CameraReset ( )
virtual

Resets the camera's noise values to their idle values.

◆ GetDeltaTime()

virtual float MoreMountains.FeedbacksForThirdParty.MMCinemachineCameraShaker.GetDeltaTime ( )
virtual

◆ GetTime()

virtual float MoreMountains.FeedbacksForThirdParty.MMCinemachineCameraShaker.GetTime ( )
virtual

◆ OnCameraShakeEvent()

virtual void MoreMountains.FeedbacksForThirdParty.MMCinemachineCameraShaker.OnCameraShakeEvent ( float duration,
float amplitude,
float frequency,
float amplitudeX,
float amplitudeY,
float amplitudeZ,
bool infinite,
MMChannelData channelData,
bool useUnscaledTime )
virtual

◆ OnCameraShakeStopEvent()

virtual void MoreMountains.FeedbacksForThirdParty.MMCinemachineCameraShaker.OnCameraShakeStopEvent ( MMChannelData channelData)
virtual

◆ OnDisable()

virtual void MoreMountains.FeedbacksForThirdParty.MMCinemachineCameraShaker.OnDisable ( )
protectedvirtual

◆ OnEnable()

virtual void MoreMountains.FeedbacksForThirdParty.MMCinemachineCameraShaker.OnEnable ( )
protectedvirtual

◆ ShakeCamera() [1/2]

virtual void MoreMountains.FeedbacksForThirdParty.MMCinemachineCameraShaker.ShakeCamera ( float duration,
bool infinite,
bool useUnscaledTime = false )
virtual

Use this method to shake the camera for the specified duration (in seconds) with the default amplitude and frequency.

Parameters
durationDuration.

◆ ShakeCamera() [2/2]

virtual void MoreMountains.FeedbacksForThirdParty.MMCinemachineCameraShaker.ShakeCamera ( float duration,
float amplitude,
float frequency,
bool infinite,
bool useUnscaledTime = false )
virtual

Use this method to shake the camera for the specified duration (in seconds), amplitude and frequency.

Parameters
durationDuration.
amplitudeAmplitude.
frequencyFrequency.

◆ ShakeCameraCo()

virtual IEnumerator MoreMountains.FeedbacksForThirdParty.MMCinemachineCameraShaker.ShakeCameraCo ( float duration,
float amplitude,
float frequency,
bool infinite,
bool useUnscaledTime )
protectedvirtual

This coroutine will shake the.

Returns
The camera co.
Parameters
durationDuration.
amplitudeAmplitude.
frequencyFrequency.

◆ Start()

virtual void MoreMountains.FeedbacksForThirdParty.MMCinemachineCameraShaker.Start ( )
protectedvirtual

On Start we reset our camera to apply our base amplitude and frequency.

◆ TestShake()

virtual void MoreMountains.FeedbacksForThirdParty.MMCinemachineCameraShaker.TestShake ( )
protectedvirtual

◆ Update()

virtual void MoreMountains.FeedbacksForThirdParty.MMCinemachineCameraShaker.Update ( )
protectedvirtual

Member Data Documentation

◆ _initialPosition

Vector3 MoreMountains.FeedbacksForThirdParty.MMCinemachineCameraShaker._initialPosition
protected

◆ _initialRotation

Quaternion MoreMountains.FeedbacksForThirdParty.MMCinemachineCameraShaker._initialRotation
protected

◆ _targetAmplitude

float MoreMountains.FeedbacksForThirdParty.MMCinemachineCameraShaker._targetAmplitude
protected

◆ _targetFrequency

float MoreMountains.FeedbacksForThirdParty.MMCinemachineCameraShaker._targetFrequency
protected

◆ _timescaleMode

TimescaleModes MoreMountains.FeedbacksForThirdParty.MMCinemachineCameraShaker._timescaleMode
protected

◆ Channel

int MoreMountains.FeedbacksForThirdParty.MMCinemachineCameraShaker.Channel = 0

the channel to listen to - has to match the one on the feedback

◆ ChannelMode

MMChannelModes MoreMountains.FeedbacksForThirdParty.MMCinemachineCameraShaker.ChannelMode = MMChannelModes.Int

whether to listen on a channel defined by an int or by a MMChannel scriptable object. Ints are simple to setup but can get messy and make it harder to remember what int corresponds to what. MMChannel scriptable objects require you to create them in advance, but come with a readable name and are more scalable

◆ DefaultShakeAmplitude

float MoreMountains.FeedbacksForThirdParty.MMCinemachineCameraShaker.DefaultShakeAmplitude = .5f

The default amplitude that will be applied to your shakes if you don't specify one.

◆ DefaultShakeFrequency

float MoreMountains.FeedbacksForThirdParty.MMCinemachineCameraShaker.DefaultShakeFrequency = 10f

The default frequency that will be applied to your shakes if you don't specify one.

◆ IdleAmplitude

float MoreMountains.FeedbacksForThirdParty.MMCinemachineCameraShaker.IdleAmplitude

the amplitude of the camera's noise when it's idle

◆ IdleFrequency

float MoreMountains.FeedbacksForThirdParty.MMCinemachineCameraShaker.IdleFrequency = 1f

the frequency of the camera's noise when it's idle

◆ LerpSpeed

float MoreMountains.FeedbacksForThirdParty.MMCinemachineCameraShaker.LerpSpeed = 5f

the speed at which to interpolate the shake

◆ MMChannelDefinition

MMChannel MoreMountains.FeedbacksForThirdParty.MMCinemachineCameraShaker.MMChannelDefinition = null

the MMChannel definition asset to use to listen for events. The feedbacks targeting this shaker will have to reference that same MMChannel definition to receive events - to create a MMChannel, right click anywhere in your project (usually in a Data folder) and go MoreMountains > MMChannel, then name it with some unique name

◆ TestAmplitude

float MoreMountains.FeedbacksForThirdParty.MMCinemachineCameraShaker.TestAmplitude = 2f

the amplitude to apply when testing this shake via the TestShake button

◆ TestDuration

float MoreMountains.FeedbacksForThirdParty.MMCinemachineCameraShaker.TestDuration = 0.3f

a duration (in seconds) to apply when testing this shake via the TestShake button

◆ TestFrequency

float MoreMountains.FeedbacksForThirdParty.MMCinemachineCameraShaker.TestFrequency = 20f

the frequency to apply when testing this shake via the TestShake button

◆ TestShakeButton

bool MoreMountains.FeedbacksForThirdParty.MMCinemachineCameraShaker.TestShakeButton

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