using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class GUITimer : MonoBehaviour {

	public LevelControler levelControler;

	private Text text;
	private float timer = 0f;

	// Use this for initialization
	void Start () {
		text = GetComponent<Text> ();
	
	}
	
	// Update is called once per frame
	void Update () {
		if (levelControler.isRunning == true) {
			timer += Time.deltaTime;
			text.text = timer.ToString ("0.00");
		} else {
			text.text = timer.ToString ("0.00");
		}


	}
}
