using UnityEngine;
using System.Collections;

public class Decoy : Ball {

	bool readyForCollision = false;

	Collider2D childCollider;
	

	public void OnTap()
	{
		Destroy(gameObject);
	}

	public void Update()
	{
		if(!BallManager.Instance.activeBall.renderer.bounds.Intersects(renderer.bounds) && !readyForCollision)
		{
			Physics2D.IgnoreCollision(childCollider, BallManager.Instance.activeBall.GetComponentInChildren<Collider2D>(), false);
			readyForCollision = true;
		}
	}

}
