示例#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);
     }
 }
示例#2
0
文件: Util.cs 项目: araex/RailgunNet
 public void Write(RailBitBuffer buffer, float f)
 {
     buffer.WriteFloat(this, f);
 }
示例#3
0
 public void Write(RailBitBuffer buffer, Vec2 coord)
 {
     buffer.WriteFloat(m_Compressor, coord.X);
     buffer.WriteFloat(m_Compressor, coord.Y);
 }