Infinite Runner Engine v1.9
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
MoreMountains.Feedbacks.MMCameraShaker Class Reference

A class to add to your camera. It'll listen to MMCameraShakeEvents and will shake your camera accordingly More...

Inheritance diagram for MoreMountains.Feedbacks.MMCameraShaker:
MoreMountains.Feedbacks.MMCameraShakerRotation

Public Member Functions

virtual void ShakeCamera (float duration, float amplitude, float frequency, float amplitudeX, float amplitudeY, float amplitudeZ, bool useUnscaledTime)
 Shakes the camera for Duration seconds, by the desired amplitude and frequency More...
 
virtual void OnCameraShakeEvent (float duration, float amplitude, float frequency, float amplitudeX, float amplitudeY, float amplitudeZ, bool infinite, int channel, bool useUnscaledTime)
 When a MMCameraShakeEvent is caught, shakes the camera More...
 

Public Attributes

int Channel = 0
 the channel to broadcast this shake on More...
 
float CooldownBetweenShakes = 0f
 a cooldown, in seconds, after a shake, during which no other shake can start More...
 

Protected Member Functions

virtual void Awake ()
 On Awake, grabs the MMShaker component More...
 
virtual void OnEnable ()
 On enable, starts listening for events More...
 
virtual void OnDisable ()
 On disable, stops listening to events More...
 

Protected Attributes

MMWiggle _wiggle
 
float _shakeStartedTimestamp = -Single.MaxValue
 

Detailed Description

A class to add to your camera. It'll listen to MMCameraShakeEvents and will shake your camera accordingly

Member Function Documentation

◆ Awake()

virtual void MoreMountains.Feedbacks.MMCameraShaker.Awake ( )
protectedvirtual

On Awake, grabs the MMShaker component

◆ OnCameraShakeEvent()

virtual void MoreMountains.Feedbacks.MMCameraShaker.OnCameraShakeEvent ( float  duration,
float  amplitude,
float  frequency,
float  amplitudeX,
float  amplitudeY,
float  amplitudeZ,
bool  infinite,
int  channel,
bool  useUnscaledTime 
)
virtual

When a MMCameraShakeEvent is caught, shakes the camera

Parameters
shakeEventShake event.

◆ OnDisable()

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

On disable, stops listening to events

◆ OnEnable()

virtual void MoreMountains.Feedbacks.MMCameraShaker.OnEnable ( )
protectedvirtual

On enable, starts listening for events

◆ ShakeCamera()

virtual void MoreMountains.Feedbacks.MMCameraShaker.ShakeCamera ( float  duration,
float  amplitude,
float  frequency,
float  amplitudeX,
float  amplitudeY,
float  amplitudeZ,
bool  useUnscaledTime 
)
virtual

Shakes the camera for Duration seconds, by the desired amplitude and frequency

Parameters
durationDuration.
amplitudeAmplitude.
frequencyFrequency.

Reimplemented in MoreMountains.Feedbacks.MMCameraShakerRotation.

Member Data Documentation

◆ _shakeStartedTimestamp

float MoreMountains.Feedbacks.MMCameraShaker._shakeStartedTimestamp = -Single.MaxValue
protected

◆ _wiggle

MMWiggle MoreMountains.Feedbacks.MMCameraShaker._wiggle
protected

◆ Channel

int MoreMountains.Feedbacks.MMCameraShaker.Channel = 0

the channel to broadcast this shake on

◆ CooldownBetweenShakes

float MoreMountains.Feedbacks.MMCameraShaker.CooldownBetweenShakes = 0f

a cooldown, in seconds, after a shake, during which no other shake can start


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