public short GetShort() { short result = BitConverter.ToInt16(_data, _position); _position += 2; return result; }
public static Color GetColor(this NetDataReader reader) { var r = reader.GetShort() * 0.01f; var g = reader.GetShort() * 0.01f; var b = reader.GetShort() * 0.01f; var a = reader.GetShort() * 0.01f; return(new Color(r, g, b, a)); }