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

GetByte() public method

public GetByte ( ) : byte
return byte
        public byte GetByte()
        {
            byte res = _data[_position];
            _position += 1;
            return res;
        }

Usage Example

        public static Color GetColor(this NetDataReader reader)
        {
            float r = reader.GetByte() * 0.01f;
            float g = reader.GetByte() * 0.01f;
            float b = reader.GetByte() * 0.01f;
            float a = reader.GetByte() * 0.01f;

            return(new Color(r, g, b, a));
        }
All Usage Examples Of LiteNetLib.Utils.NetDataReader::GetByte