33 lines
1.3 KiB
C#
33 lines
1.3 KiB
C#
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class TopPanelView : MonoBehaviour
|
|
{
|
|
public TMP_InputField SongCurrentTimeInputField { get; private set; }
|
|
public TMP_InputField BaseBPMInputField { get; private set; }
|
|
public Slider NoteStreamSlider { get; private set; }
|
|
public TextMeshProUGUI StatusBar { get; private set; }
|
|
public Button PlaySongButton { get; private set; }
|
|
public Button StopSongButton { get; private set; }
|
|
|
|
public Transform _Transform { get; private set; }
|
|
void Awake()
|
|
{
|
|
_Transform = gameObject.GetComponent<Transform>();
|
|
SongCurrentTimeInputField = _Transform.Find("Input_SongTime").GetComponent<TMP_InputField>();
|
|
BaseBPMInputField = _Transform.Find("Input_BaseBPM").GetComponent<TMP_InputField>();
|
|
NoteStreamSlider = _Transform.Find("Slider_NoteStream").GetComponent<Slider>();
|
|
StatusBar = _Transform.Find("StatusBar").GetComponent<TextMeshProUGUI>();
|
|
PlaySongButton = _Transform.Find("Play").GetComponent<Button>();
|
|
StopSongButton = _Transform.Find("Pause").GetComponent<Button>();
|
|
}
|
|
/// <summary>
|
|
/// ¸Ä±äʱ¼ä±êÇ©
|
|
/// </summary>
|
|
public void ChangeTimeText(float time)
|
|
{
|
|
SongCurrentTimeInputField.text = time.ToString();
|
|
}
|
|
}
|