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

public class DifficultySlider : MonoBehaviour
{
    private Slider slider;
    private void Start()
    {
        ResourceManager.Instance.ResourceAmount = GameManager.Instance.ResourceMaxAmount;
        ResourceManager.Instance.MedicineClicks = 0;
        slider = GetComponent<Slider>();
        slider.onValueChanged.AddListener(SliderCheck);
        GameManager.Instance.TickTime = slider.value;
    }

    private void SliderCheck( float value)
    {
        GameManager.Instance.TickTime = value;
        Debug.Log("value: "+ GameManager.Instance.TickTime);
    }
}
