예제 #1
0
 public ConnectionEvent(ACSProtocolReader reader)
 {
     DriverName = reader.ReadStringW();
     DriverGuid = reader.ReadStringW();
     CarId      = reader.ReadByte();
     CarModel   = reader.ReadString();
     CarSkin    = reader.ReadString();
 }
예제 #2
0
        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());
        }