Class CameraShaker
Used to shake the camera
Namespace: WeaverCore
Assembly: WeaverCore.dll
Syntax
public class CameraShaker : MonoBehaviour
Properties
| Edit this page View SourceInstance
Declaration
public static CameraShaker Instance { get; }
Property Value
Type | Description |
---|---|
CameraShaker |
Methods
| Edit this page View SourceSetRumble(Vector3)
Causes the camera to have a rumble effect
Declaration
public void SetRumble(Vector3 amount)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | amount | The amount of rumble to be applied |
SetRumble(RumbleType)
Causes the camera to have a rumble effect
Declaration
public void SetRumble(RumbleType type)
Parameters
Type | Name | Description |
---|---|---|
RumbleType | type | The type of rumble effect to apply |
Shake(Vector3, float, int)
Shakes the camera
Declaration
public void Shake(Vector3 amount, float duration, int priority = 2147483647)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | amount | How much the camera should shake |
float | duration | How long the camera should shake for |
int | priority | The priority of this action. The higher the priority, the more likely this shake action will be used instead of other shake actions |
Shake(ShakeType)
Shakes the camera
Declaration
public void Shake(ShakeType type)
Parameters
Type | Name | Description |
---|---|---|
ShakeType | type | The type of shake to be applied |