Skip to content

Instantly share code, notes, and snippets.

View slonermike's full-sized avatar

Mike Slone slonermike

View GitHub Profile
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// To be added to an AI to control being pushed by outside sources.
/// </summary>
public class PushModule : MonoBehaviour {
[Tooltip("Rate at which we return to velocity zero.")]
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 () {
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
// TODO: Is there really anything about this that makes it
// specific to cameras? This logic could be used to shake
// anything. Only thing tying it to that is the ShakeAllCameras
// functionality but we could work that out by tagging things by
// generic categories, and shaking all objects in a category.
//