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

public class DisplayComboUI : MonoBehaviour
{

    public List<Text> numbers = new List<Text>();
    public ComboGenerator comboGenerator;

    void OnEnable() 
    {
        EventManager.StartListening(Constants.UpdateCombo, UpdateDisplayedCombo);
    }

    void OnDisable() 
    {
        EventManager.StopListening(Constants.UpdateCombo, UpdateDisplayedCombo);
    }

    void UpdateDisplayedCombo()
    {
        for (int i = 0; i < 4; i++)
        {
            numbers[i].text = comboGenerator.generatedCombo[i].ToString("0");
        }
    }
}
