using UnityEngine;
using System.Collections;

/// <summary>
/// Prune. Dynamically removes an obsticle you can change the rate to increase or decrease difficulty
/// </summary>
public class Prune : MonoBehaviour 
{
	public int Rate = 4; // this is a 25% chance to remove a  block
	// Use this for initialization
	void Start () 
	{
		if(Random.Range(0,Rate+1) ==1)//random range is not inclusive, we add one to compenstate for this
			//we are checking if our random number is one of these numbers if it is we are going to delete it
		{
			Destroy(gameObject); //remove the gameobject
		}
		else
		{
			Destroy(this); // get rid of the script
		}
	}
	

}
