void OnCollisionEnter2D() { JuiceBox.Rattle(door); Destroy(door, 0.6f); JuiceBox.Rattle(door2); Destroy(door2, 0.6f); JuiceBox.Wobble(View, 0.5f); Destroy(gameObject); }
// A nice easy use of the Wobble function. // A good way to show an object was bumped/clicked/etc. void OnMouseDown() { JuiceBox.Wobble(gameObject); }