MMFeedbacks  v1.6
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:

Public Member Functions

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

Public Attributes

int Channel = 0
 

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
 

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,
bool  infinite,
int  channel 
)
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 
)
virtual

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

Parameters
durationDuration.
amplitudeAmplitude.
frequencyFrequency.

Member Data Documentation

◆ _wiggle

MMWiggle MoreMountains.Feedbacks.MMCameraShaker._wiggle
protected

◆ Channel

int MoreMountains.Feedbacks.MMCameraShaker.Channel = 0

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