Slider for speed implemented

This commit is contained in:
dereelatwit
2023-08-08 19:30:56 -04:00
parent 45cb21030f
commit e5a4a17022
4 changed files with 197 additions and 4 deletions
@@ -0,0 +1,28 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
using UnityEngine.UI;
public class SliderScript : MonoBehaviour
{
[SerializeField] private Slider _slider;
[SerializeField] private TextMeshProUGUI _sliderText;
// Start is called before the first frame update
void Start()
{
_slider.onValueChanged.AddListener((v) =>
{
_sliderText.text = v.ToString("0.00");
});
}
// Update is called once per frame
void Update()
{
}
}