using UnityEngine;
using System.Collections;

public class TimerLabel : MonoBehaviour
{
	int timer = 5;
	// Use this for initialization
	void Start ()
	{
		Invoke ("DecTimer", 1f);
	}
	
	// Update is called once per frame
	void DecTimer ()
	{
		timer --;		
		GetComponent<UILabel> ().text = "Starts in ... " + timer;		
		if (timer > 0)
			Invoke ("DecTimer", 1f);
		else
			Application.LoadLevel ("GamePlay");
	}
}
