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

public class UpdateTimerUI : MonoBehaviour {

    public Text gameTimerTextB, gameTimerTextF;
    public GameTimer gameTimer;


	// Use this for initialization
	void Start () 
    {
        

        if (gameTimer == null)
            Debug.LogError(gameObject + " is missing " + gameObject.GetComponent<GameTimer>());

		if (gameTimerTextB == null || gameTimerTextF == null)
            Debug.LogError(gameObject + " is missing " + gameObject.GetComponent<Text>());

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

        gameTimerTextB.text = gameTimerTextF.text = gameTimer.timeLeft.ToString();
		
	}
}
