Feel
5.1
The best way to improve your game's feel and make it extra juicy
|
A class to add to your camera. It'll listen to MMCameraShakeEvents and will shake your camera accordingly More...
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, MMChannelData channelData, bool useUnscaledTime) |
When a MMCameraShakeEvent is caught, shakes the camera More... | |
Public Attributes | |
MMChannelModes | ChannelMode = MMChannelModes.Int |
int | Channel = 0 |
the channel to listen to - has to match the one on the feedback More... | |
MMChannel | MMChannelDefinition = null |
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 |
A class to add to your camera. It'll listen to MMCameraShakeEvents and will shake your camera accordingly
|
protectedvirtual |
On Awake, grabs the MMShaker component
|
virtual |
When a MMCameraShakeEvent is caught, shakes the camera
shakeEvent | Shake event. |
|
protectedvirtual |
On disable, stops listening to events
|
protectedvirtual |
On enable, starts listening for events
|
virtual |
Shakes the camera for Duration seconds, by the desired amplitude and frequency
duration | Duration. |
amplitude | Amplitude. |
frequency | Frequency. |
Reimplemented in MoreMountains.Feedbacks.MMCameraShakerRotation.
|
protected |
|
protected |
int MoreMountains.Feedbacks.MMCameraShaker.Channel = 0 |
the channel to listen to - has to match the one on the feedback
MMChannelModes MoreMountains.Feedbacks.MMCameraShaker.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
float MoreMountains.Feedbacks.MMCameraShaker.CooldownBetweenShakes = 0f |
a cooldown, in seconds, after a shake, during which no other shake can start
MMChannel MoreMountains.Feedbacks.MMCameraShaker.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