smoke purpp
This commit is contained in:
1 parent
f8e12cf990
commit
9e1a596ebc
9 files changed
+92
-85
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user