Skip to content

Instantly share code, notes, and snippets.

@slonermike
Created March 5, 2018 23:45
Show Gist options
  • Save slonermike/ee25419e7fa0977736eb26903bb4302e to your computer and use it in GitHub Desktop.
Save slonermike/ee25419e7fa0977736eb26903bb4302e to your computer and use it in GitHub Desktop.
using UnityEngine;
using System.Collections;
public class CameraShake : MonoBehaviour {
public float shakeSeconds = 0.5f;
public float shakeMagnitude = 0.25f;
// Use this for initialization
void Start () {
CameraShaker.ShakeAllCameras (shakeSeconds, shakeMagnitude);
// No actual processing needed. Scrap it.
this.enabled = false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment