C# Class Nez.CameraShake

Inheritance: Component, IUpdatable
Afficher le fichier Open project: prime31/Nez

Méthodes publiques

Méthode 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

Méthode Description
IUpdatable ( ) : void

Method Details

shake() public méthode

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
Résultat void