ScreenShake

ScreenShake lets you shake the screen, either a limited number of times or forever (until Stop() is manually called). It works in conjunction with JetCamera; the JetCamera is what performs the shaking movement.

Public Methods

public void ShakeIfOnCamera(Transform _transform)

Shakes the screen, but only if the _transform value passed in is currently viewable on the main camera.

public void Shake(Magnitude _magnitude = Magnitude.Medium, EndingMagnitude endingMagnitude = EndingMagnitude.Fourth)

Shakes the screen. _magnitude represents the strength of the shake as it begins. endingMagnitude represents the strength of the shake as it ends.

public void ShakeForDuration(Magnitude _magnitude = Magnitude.Small, float duration = 5.0f, EndingMagnitude endingMagnitude = EndingMagnitude.Fourth)

Continually shakes the screen for a set length of time. _magnitude represents the strength of the shake as it begins. endingMagnitude represents the strength of the shake as it ends.

public void ShakeForever(Magnitude _magnitude = Magnitude.Small)

Shakes the screen continuously until the Stop() method is manually called. _magnitude represents the strength of the shake.

public void Stop()

Stops any screen shakes currently in progress.

public void SetCamera(JetCamera _camera)

This method sets the camera which moves when the screen shakes.