vdfs n idk what else

This commit is contained in:
ntr committed 2023-10-02 19:18:36 +11:00
1 parent 51a9dccd97
commit 3c211a56fb
15 files changed
+130 -11

No files matched your search

+14 -1
View File
@@ -28,6 +28,7 @@ public class Timing: MonoBehaviour {
double lapStart;
IEnumerator noticeLifecycle;
IEnumerator msgLifecycle;
void Awake() {
ui = GetComponent<TimingUI>();
@@ -146,10 +147,22 @@ public class Timing: MonoBehaviour {
IEnumerator RecentLapLifecycle(Lap l) {
ui.ShowRecentLap(l);
yield return new WaitForSeconds(5);
yield return new WaitForSeconds(10);
ui.HideRecentLap();
}
public void Message(string msg) {
if (msgLifecycle != null) StopCoroutine(msgLifecycle);
msgLifecycle = ShowMessage(msg);
StartCoroutine(msgLifecycle);
}
IEnumerator ShowMessage(string msg) {
ui.ShowMessage(msg);
yield return new WaitForSeconds(5);
ui.HideMessage();
}
// these can be null after HMR
public Lap LapRecord => lapService?.LapRecord;
public Lap Pb => lapService?.Pb;