smoke purpp

This commit is contained in:
ntr committed 2023-08-31 16:55:31 +10:00
1 parent dba4e3fe2b
commit d086069e18
9 files changed
+92 -85

No files matched your search

+9 -3
View File
@@ -23,7 +23,8 @@ public class LapService {
PbDTO _pb;
PbDTO _lr;
public Lap PB;
public Lap Pb;
public Lap LapRecord;
public LapService(string mapName) {
_mapName = mapName;
@@ -53,15 +54,20 @@ public class LapService {
_pb = dto.Pb;
_lr = dto.LapRecord;
PB = new Lap {
Pb = new Lap {
Map = _pb.Map,
Sectors = _pb.Sectors.Select((d, i) => new SectorTime { Sector = i + 1, Seconds = d }).ToList(),
};
LapRecord = new Lap {
Map = _lr.Map,
Sectors = _lr.Sectors.Select((d, i) => new SectorTime { Sector = i + 1, Seconds = d }).ToList(),
};
} catch (Exception e) {
Debug.LogWarning($"Failed to set lap times {e}");
_pb = null;
_lr = null;
PB = null;
Pb = null;
}
}