Ejemplo n.º 1
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();
 }
Ejemplo n.º 2
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();
 }
Ejemplo n.º 3
0
 public ClientEventEvent(ACSProtocolReader reader)
 {
     EventType = reader.ReadByte();
     CarId     = reader.ReadByte();
     if (EventType == ACSProtocol.ACSP_CE_COLLISION_WITH_CAR)
     {
         OtherCarId = reader.ReadByte();
     }
     else
     {
         OtherCarId = 255;
     }
     Speed              = reader.ReadSingle();
     WorldPosition      = new Vector3f(reader);
     RelationalPosition = new Vector3f(reader);
 }
Ejemplo n.º 4
0
 public Vector3f(ACSProtocolReader reader)
 {
     X = reader.ReadSingle();
     Y = reader.ReadSingle();
     Z = reader.ReadSingle();
 }