Show / Hide Table of Contents

Class CameraShaker

Used to shake the camera

Inheritance
object
Object
Component
Behaviour
MonoBehaviour
CameraShaker
Namespace: WeaverCore
Assembly: WeaverCore.dll
Syntax
public class CameraShaker : MonoBehaviour

Properties

| Edit this page View Source

Instance

Declaration
public static CameraShaker Instance { get; }
Property Value
Type Description
CameraShaker

Methods

| Edit this page View Source

SetRumble(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

| Edit this page View Source

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

| Edit this page View Source

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

| Edit this page View Source

Shake(ShakeType)

Shakes the camera

Declaration
public void Shake(ShakeType type)
Parameters
Type Name Description
ShakeType type

The type of shake to be applied

Extension Methods

ReflectionUtilities.ReflectCallMethod(object, string, object[], BindingFlags)
ReflectionUtilities.ReflectGetField(object, string, BindingFlags)
ReflectionUtilities.ReflectGetMethod(object, string, BindingFlags)
ReflectionUtilities.ReflectGetProperty(object, string, BindingFlags)
ReflectionUtilities.ReflectSetField(object, string, object, BindingFlags)
ReflectionUtilities.ReflectSetProperty(object, string, object, BindingFlags)
CoroutineUtilities.RunCoroutineWhile<T>(T, IEnumerator, Func<bool>)
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Generated by DocFX
☀
☾