Skip to content

Instantly share code, notes, and snippets.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ObjectPooled : MonoBehaviour
{
public static ObjectPooled current;
public GameObject pooledObject;
public int pooledAmount = 20;
using UnityEngine;
using System.Collections;
// based on http://unitytipsandtricks.blogspot.com/2013/05/camera-shake.html
public class CameraShake : MonoBehaviour
{
public float duration = 2f;
public float speed = 20f;
public float magnitude = 2f;
public AnimationCurve damper = new AnimationCurve(new Keyframe(0f, 1f), new Keyframe(0.9f, .33f, -2f, -2f), new Keyframe(1f, 0f, -5.65f, -5.65f));
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CollectiblePieceScript : MonoBehaviour {
Vector3 target;
TrailRenderer trail;
Rigidbody2D rb;
Transform baseParent;
SpriteRenderer sprite;