player can work now
This commit is contained in:
@@ -16,6 +16,7 @@ public class TimeSliderUI : MonoBehaviour
|
||||
[SerializeField]
|
||||
private Slider _slider;
|
||||
|
||||
private TimeSpan _time;
|
||||
public void ShowTimeSliderDialog(string title, string description, Action onCancel, Action<TimeSpan> onConfirm)
|
||||
{
|
||||
TimeManager.Instance.OnFastForwardEnd += CloseDialog;
|
||||
@@ -34,7 +35,7 @@ public class TimeSliderUI : MonoBehaviour
|
||||
});
|
||||
_btnOk.onClick.AddListener(() =>
|
||||
{
|
||||
onConfirm?.Invoke(TimeSpan.FromSeconds(_slider.value));
|
||||
onConfirm?.Invoke(_time);
|
||||
Hide();
|
||||
});
|
||||
|
||||
@@ -52,9 +53,9 @@ public class TimeSliderUI : MonoBehaviour
|
||||
|
||||
private void Update()
|
||||
{
|
||||
var time = TimeSpan.FromSeconds(_slider.value);
|
||||
_time = TimeSpan.FromHours(_slider.value);
|
||||
|
||||
_description.text = $"{time.Hours} hours {time.Minutes} minutes";
|
||||
_description.text = $"{_time.Hours} hours";
|
||||
}
|
||||
|
||||
private void Hide()
|
||||
|
||||
Reference in New Issue
Block a user