Platformer Pro  2.3.2
A platform game kit for Unity.
PlatformerPro.Extras.FX_Shake Class Reference

FX class which shakes something back and forth (usually a camera). More...

Inheritance diagram for PlatformerPro.Extras.FX_Shake:
PlatformerPro.Extras.FX_Base

Public Attributes

GameObject shakeTarget
 Target to shake. More...
 
Vector3 shakeAmount = new Vector3(0.5f, 0.5f, 0)
 How far we shake at max in (x,y,z) More...
 
float shakeRate = 0.033f
 How fast does the shake change direction. More...
 
float decay = 0.85f
 How fast we decay 0 instantly, 1 not at all. More...
 
bool returnToOriginalX
 Should we reset to original position in X. More...
 
bool returnToOriginalY
 Should we reset to original position in Y. More...
 
bool returnToOriginalZ
 Should we reset to original position in Z. More...
 
- Public Attributes inherited from PlatformerPro.Extras.FX_Base
bool playOnAwake
 Should we play this on awake. More...
 

Protected Member Functions

override void DoEffect ()
 Do the effect. More...
 

Protected Attributes

Vector3 currentIntensityMax
 The current velocity. More...
 
Vector3 originalPosition
 The original position of the object. More...
 
Vector3 lastShakePosition
 The original position of the object. More...
 
bool shakeStarted
 have we started shaking? More...
 
PlatformCamera zoneCamera
 Cached reference to zone camera, used to turn snapping on and off. More...
 
float shakeTimer
 
Vector3 shakeTargetPosition
 
Vector3 lastShakeDirection
 
- Protected Attributes inherited from PlatformerPro.Extras.FX_Base
bool playWhenEnabled
 If we have play on awake true but we are not enabled we will defer the play until we are enabled. More...
 

Additional Inherited Members

- Public Member Functions inherited from PlatformerPro.Extras.FX_Base
virtual void StartEffect ()
 Starts the effect. More...
 
virtual void StartEffect (GameObject callbackObject, string function)
 Starts the effect. More...
 

Detailed Description

FX class which shakes something back and forth (usually a camera).

Member Function Documentation

◆ DoEffect()

override void PlatformerPro.Extras.FX_Shake.DoEffect ( )
protectedvirtual

Do the effect.

Implements PlatformerPro.Extras.FX_Base.

Member Data Documentation

◆ currentIntensityMax

Vector3 PlatformerPro.Extras.FX_Shake.currentIntensityMax
protected

The current velocity.

◆ decay

float PlatformerPro.Extras.FX_Shake.decay = 0.85f

How fast we decay 0 instantly, 1 not at all.

◆ lastShakeDirection

Vector3 PlatformerPro.Extras.FX_Shake.lastShakeDirection
protected

◆ lastShakePosition

Vector3 PlatformerPro.Extras.FX_Shake.lastShakePosition
protected

The original position of the object.

◆ originalPosition

Vector3 PlatformerPro.Extras.FX_Shake.originalPosition
protected

The original position of the object.

◆ returnToOriginalX

bool PlatformerPro.Extras.FX_Shake.returnToOriginalX

Should we reset to original position in X.

◆ returnToOriginalY

bool PlatformerPro.Extras.FX_Shake.returnToOriginalY

Should we reset to original position in Y.

◆ returnToOriginalZ

bool PlatformerPro.Extras.FX_Shake.returnToOriginalZ

Should we reset to original position in Z.

◆ shakeAmount

Vector3 PlatformerPro.Extras.FX_Shake.shakeAmount = new Vector3(0.5f, 0.5f, 0)

How far we shake at max in (x,y,z)

◆ shakeRate

float PlatformerPro.Extras.FX_Shake.shakeRate = 0.033f

How fast does the shake change direction.

◆ shakeStarted

bool PlatformerPro.Extras.FX_Shake.shakeStarted
protected

have we started shaking?

◆ shakeTarget

GameObject PlatformerPro.Extras.FX_Shake.shakeTarget

Target to shake.

◆ shakeTargetPosition

Vector3 PlatformerPro.Extras.FX_Shake.shakeTargetPosition
protected

◆ shakeTimer

float PlatformerPro.Extras.FX_Shake.shakeTimer
protected

◆ zoneCamera

PlatformCamera PlatformerPro.Extras.FX_Shake.zoneCamera
protected

Cached reference to zone camera, used to turn snapping on and off.


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