using UnityEngine;
using System.Collections;

public class Bits : MonoBehaviour {

	// Use this for initialization
	void Start () {
		Rigidbody2D body = gameObject.GetComponent<Rigidbody2D> ();
		body.velocity = new Vector2 (HelperFunctions.getScaledRandom (-5, 5), HelperFunctions.getScaledRandom (0, 15));
		body.angularVelocity  = HelperFunctions.getScaledRandom (-180, 180);
	}
	
	// Update is called once per frame
	void Update () {
	
	}
	
	public void OnBecameInvisible() {
		GameObject.Destroy (gameObject);
	}
}
