using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

public class GameTimer : MonoBehaviour {

	public float GameTimerValue;
	public Text GameTimerText;

	void Update () 
	{
		// Very optimistic I think
		if (GameTimerValue <= 999999) 
		{
			GameTimerValue -= Time.deltaTime;
			GameTimerText.text = GameTimerValue.ToString("000000");
		}

	    if (GameTimerValue <= 0)
	    {
	        SceneManager.LoadScene("_menu");
	    }
	}
}
