C# Class Nez.CameraShake

Inheritance: Component, IUpdatable
Show file Open project: prime31/Nez

Public Methods

Method Description
shake ( float shakeIntensity = 15f, float shakeDegredation = 0.9f, Vector2 shakeDirection = default(Vector2) ) : void

if the shake is already running this will overwrite the current values only if shakeIntensity > the current shakeIntensity. if the shake is not currently active it will be started.

Private Methods

Method Description
IUpdatable ( ) : void

Method Details

shake() public method

if the shake is already running this will overwrite the current values only if shakeIntensity > the current shakeIntensity. if the shake is not currently active it will be started.
public shake ( float shakeIntensity = 15f, float shakeDegredation = 0.9f, Vector2 shakeDirection = default(Vector2) ) : void
shakeIntensity float how much should we shake it
shakeDegredation float higher values cause faster degradation
shakeDirection Vector2 Vector3.zero will result in a shake on just the x/y axis. any other values will result in the passed /// in shakeDirection * intensity being the offset the camera is moved
return void