LiteNetLib.Utils.NetDataReader.GetShort C# (CSharp) Method

GetShort() public method

public GetShort ( ) : short
return short
        public short GetShort()
        {
            short result = BitConverter.ToInt16(_data, _position);
            _position += 2;
            return result;
        }

Usage Example

Example #1
0
        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));
        }
All Usage Examples Of LiteNetLib.Utils.NetDataReader::GetShort