changed maps but lighting fked
This commit is contained in:
1 parent
6e9d834cfd
commit
7e0703975d
54 files changed
+75740
-8208
No files matched your search
+11
-6
@@ -26,8 +26,6 @@ public class Timing: MonoBehaviour {
|
||||
|
||||
IEnumerator noticeLifecycle;
|
||||
|
||||
public string Position => $"{lapService.Position} / {lapService.Completions}";
|
||||
|
||||
void Awake() {
|
||||
ui = GetComponent<TimingUI>();
|
||||
sectorTimes = new List<SectorTime>();
|
||||
@@ -49,6 +47,12 @@ public class Timing: MonoBehaviour {
|
||||
}
|
||||
|
||||
void Update() {
|
||||
// hmr
|
||||
if (lapService == null) {
|
||||
Awake();
|
||||
Start();
|
||||
}
|
||||
|
||||
if (timerEnabled) {
|
||||
sectorTime = Time.timeAsDouble - sectorStart;
|
||||
lapTime = Time.timeAsDouble - lapStart;
|
||||
@@ -127,8 +131,7 @@ public class Timing: MonoBehaviour {
|
||||
if (noticeLifecycle != null) StopCoroutine(noticeLifecycle);
|
||||
noticeLifecycle = RecentLapLifecycle(l);
|
||||
StartCoroutine(noticeLifecycle);
|
||||
|
||||
StartCoroutine(lapService.PostLap(l));
|
||||
StartCoroutine(lapService?.PostLap(l));
|
||||
}
|
||||
|
||||
IEnumerator RecentLapLifecycle(Lap l) {
|
||||
@@ -137,8 +140,10 @@ public class Timing: MonoBehaviour {
|
||||
ui.HideRecentLap();
|
||||
}
|
||||
|
||||
public Lap LapRecord => lapService.LapRecord;
|
||||
public Lap Pb => lapService.Pb;
|
||||
// these can be null after HMR
|
||||
public Lap LapRecord => lapService?.LapRecord;
|
||||
public Lap Pb => lapService?.Pb;
|
||||
public string Position => $"{lapService?.Position} / {lapService?.Completions}";
|
||||
|
||||
public TimingNotice CompareLap(Lap lap) {
|
||||
double? lrSeconds = LapRecord != null ? LapRecord.TotalTime : null;
|
||||
|
||||
Reference in new issue
Block a user