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

public class HUDController : MonoBehaviour
{

    public static HUDController Current { get; private set; }

    public Text GooLevelValue;
    //public Text TimeValue;

    void Awake()
    {
        Init();
    }
    private void Init()
    {
        Current = this;
        EventManager.SubscribeGooLevelChanged(SetGooCount);
    }
    public void SetGooCount(int value)
    {
        GooLevelValue.text = value.ToString();
    }
    //public void SetTimeRemaining(TimeSpan value)
    //{
    //    string timeString;
    //    if (value.TotalSeconds < 10)
    //    {
    //        timeString = String.Format("{0}.{1:00}", value.Seconds, value.Milliseconds / 10);
    //    }
    //    else
    //    {
    //        timeString = String.Format("{0}:{1:00}", value.Minutes, value.Seconds);
    //    }
    //    TimeValue.text = timeString;
    //}

}
