using UnityEngine;
using System.Collections;
using TMPro;

public class FadedRoom : MonoBehaviour
{
    public TextMeshPro txtTimeLeft;

    public float startingTime;

    public void StartTimer(float timer)
    {
        this.startingTime = timer;

        txtTimeLeft.text = ((int)this.startingTime+1).ToString();
    }

    private void Update()
    {
        startingTime -= Time.deltaTime;
        txtTimeLeft.text = ((int)this.startingTime+1).ToString();
    }
}
