public LeaderboardEntry(ACSProtocolReader reader) { CarId = reader.ReadByte(); Time = TimeSpan.FromMilliseconds(reader.ReadUInt32()); Laps = reader.ReadUInt16(); HasCompleted = reader.ReadByte() != 0; }
public LapCompletedEvent(ACSProtocolReader reader) { CarId = reader.ReadByte(); LapTime = TimeSpan.FromMilliseconds(reader.ReadUInt32()); Cuts = reader.ReadByte(); CarsCount = reader.ReadByte(); Leaderboard = new List <LeaderboardEntry>(); for (int i = 0; i < CarsCount; i++) { var entry = new LeaderboardEntry(reader); Leaderboard.Add(entry); } GripLevel = reader.ReadSingle(); }