using UnityEngine;
using System.Collections;

public class StartGameTimer : MonoBehaviour {

	public float timer = 4.0f;
	private bool commenceTimer = true;

	void Start()
	{
		commenceTimer = true;
        EventManager.TriggerEvent(Constants.StartTimer);
	}

	void Update()
	{
		if(commenceTimer)
		{
			timer -= Time.deltaTime;
			if(timer <= 0)
			{
				timer = 0;
				commenceTimer = false;
				EventManager.TriggerEvent(Constants.START_GAME);
			}
		}

	}
}
