spaceraceshared

This commit is contained in:
ntr committed 2023-08-29 17:38:16 +10:00
1 parent 0b2d4ccd14
commit 96e552a2e1
14 files changed
+118 -93

No files matched your search

+6 -3
View File
@@ -25,6 +25,8 @@ public class Timing: MonoBehaviour {
IEnumerator noticeLifecycle;
LapFetchService lapFetchService;
void Awake() {
ui = GetComponent<TimingUI>();
sectorTimes = new List<SectorTime>();
@@ -38,6 +40,9 @@ public class Timing: MonoBehaviour {
Debug.Log("Track Sector Count - " + sectors.Length);
LapStorageService.GetPlayerLaps(mapName);
lapFetchService = new LapFetchService(mapName);
StartCoroutine(lapFetchService.GetPb());
}
void Update() {
@@ -129,9 +134,7 @@ public class Timing: MonoBehaviour {
ui.HideRecentLap();
}
public Lap PB() {
return LapStorageService.PB(mapName);
}
public Lap PB() => LapStorageService.PB(mapName);
public TimingNotice PBSectorDiff(SectorTime s) => PB() switch {
Lap pb => pb.Sectors.SingleOrDefault(fls => fls.Sector == s.Sector) switch {