using UnityEngine;
using System.Collections;

public class TeleportComponent : MonoBehaviour {

	[SerializeField]
	float lowerBoundary = 0f;

	const float MAXIMUM_BOUNDARY_Y = 5.12f;

	// We've added one to make sure it doesn't spawn in the wall.
	const float BOUNDARY_X = 2.84f;

	public void Teleport(Transform ball)
	{
		ball.position = new Vector3(Random.Range(-BOUNDARY_X, BOUNDARY_X), Random.Range(lowerBoundary, MAXIMUM_BOUNDARY_Y));
	}
}
