Beispiel #1
0
 protected override void EncodeMutableData(RailBitBuffer buffer, uint flags)
 {
     if (this.GetFlag(flags, FLAG_X))
     {
         buffer.WriteFloat(GameCompressors.Coordinate, this.X);
     }
     if (this.GetFlag(flags, FLAG_Y))
     {
         buffer.WriteFloat(GameCompressors.Coordinate, this.Y);
     }
     if (this.GetFlag(flags, FLAG_ANGLE))
     {
         buffer.WriteFloat(GameCompressors.Angle, this.Angle);
     }
     if (this.GetFlag(flags, FLAG_STATUS))
     {
         buffer.WriteByte(this.Status);
     }
 }
Beispiel #2
0
 public void Write(RailBitBuffer buffer, float f)
 {
     buffer.WriteFloat(this, f);
 }
Beispiel #3
0
 public void Write(RailBitBuffer buffer, Vec2 coord)
 {
     buffer.WriteFloat(m_Compressor, coord.X);
     buffer.WriteFloat(m_Compressor, coord.Y);
 }