public LeaderboardEntry(ACSProtocolReader reader) { CarId = reader.ReadByte(); Time = TimeSpan.FromMilliseconds(reader.ReadUInt32()); Laps = reader.ReadUInt16(); HasCompleted = reader.ReadByte() != 0; }
public CarUpdateEvent(ACSProtocolReader reader) { CarId = reader.ReadByte(); Position = new Vector3f(reader); Velocity = new Vector3f(reader); Gear = reader.ReadByte(); Rpm = reader.ReadUInt16(); NormalizedSplinePosition = reader.ReadSingle(); }
public readonly TimeSpan Elapsed; // Elapsed time from the start(this might be negative for races with WaitTime) public SessionInfoEvent(ACSProtocolReader reader) { Version = reader.ReadByte(); SessionIndex = reader.ReadByte(); CurrentSessionIndex = reader.ReadByte(); SessionCount = reader.ReadByte(); ServerName = reader.ReadStringW(); Track = reader.ReadString(); TrackConfig = reader.ReadString(); Name = reader.ReadString(); Type = reader.ReadByte(); Time = TimeSpan.FromSeconds(reader.ReadUInt16()); Laps = reader.ReadUInt16(); WaitTime = TimeSpan.FromSeconds(reader.ReadUInt16()); AmbientTemp = reader.ReadByte(); RoadTemp = reader.ReadByte(); WeatherGraphics = reader.ReadString(); Elapsed = TimeSpan.FromMilliseconds(reader.ReadInt32()); }