﻿using UnityEngine;
using System.Collections;

public class Timer : MonoBehaviour {

    public float timer = 160;

    public bool endtime;

    public UnityEngine.UI.Text timertext;

	// Use this for initialization
	void Start () {

        endtime = false;

    }
	
	// Update is called once per frame
	void Update () {

        timertext.text = timer.ToString("#");

        timer -= Time.deltaTime;

        if (timer < 0f)
        {
            endtime = true;
        }

	}
}
