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

public class MainGameDebugParameter : MonoBehaviour
{
    [SerializeField] private Text text;
    [SerializeField] private Text value;
    [SerializeField] private Slider slider;

    [SerializeField] private float minValue;
    [SerializeField] private float maxValue;
    // [SerializeField] private String paramName;
    
    void Awake()
    {
        slider.minValue = minValue;
        slider.maxValue = maxValue;
        // text.text = paramName;
        slider.OnValueChangedAsObservable().SubscribeToText(value, f => $"{f:F3}");
    }

    public void SetValue(float value)
    {
        slider.value = value;
    }

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