C# Class GarrysModLuaShared.Classes.bf_read

This is the object passed to usermessage.Hook when a message is received. It contains each value stored in the message in sequential order. You should read values from it in the order you wrote them.
Inheritance: LuaObject
Datei anzeigen Open project: OmegaExtern/gmod-csharp-binary-module

Public Methods

Method Description
ReadAngle ( ) : Angle

Reads an returns an angle object from the bitstream.

ReadBool ( ) : bool

Reads 1 bit an returns a bool representing the bit.

ReadChar ( ) : sbyte

Reads a signed char and returns a number from -127 to 127 representing the ascii value of that char.

ReadEntity ( ) : Entity

Reads a short representing an entity index and returns the matching entity handle.

ReadFloat ( ) : double

Reads a 4 byte float from the bitstream and returns it.

ReadLong ( ) : int

Reads a 4 byte long from the bitstream and returns it.

ReadShort ( ) : short

Reads a 2 byte short from the bitstream and returns it.

ReadString ( ) : string

Reads a null terminated string from the bitstream.

ReadVector ( ) : Vector

Reads a special encoded vector from the bitstream and returns it, this function is not suitable to send normals.

ReadVectorNormal ( ) : Vector

Reads a special encoded vector normal from the bitstream and returns it, this function is not suitable to send vectors that represent a position.

Reset ( ) : void

Rewinds the bitstream so it can be read again.

bf_read ( int index )

Method Details

ReadAngle() public method

Reads an returns an angle object from the bitstream.
public ReadAngle ( ) : Angle
return Angle

ReadBool() public method

Reads 1 bit an returns a bool representing the bit.
public ReadBool ( ) : bool
return bool

ReadChar() public method

Reads a signed char and returns a number from -127 to 127 representing the ascii value of that char.
public ReadChar ( ) : sbyte
return sbyte

ReadEntity() public method

Reads a short representing an entity index and returns the matching entity handle.
public ReadEntity ( ) : Entity
return Entity

ReadFloat() public method

Reads a 4 byte float from the bitstream and returns it.
public ReadFloat ( ) : double
return double

ReadLong() public method

Reads a 4 byte long from the bitstream and returns it.
public ReadLong ( ) : int
return int

ReadShort() public method

Reads a 2 byte short from the bitstream and returns it.
public ReadShort ( ) : short
return short

ReadString() public method

Reads a null terminated string from the bitstream.
public ReadString ( ) : string
return string

ReadVector() public method

Reads a special encoded vector from the bitstream and returns it, this function is not suitable to send normals.
public ReadVector ( ) : Vector
return Vector

ReadVectorNormal() public method

Reads a special encoded vector normal from the bitstream and returns it, this function is not suitable to send vectors that represent a position.
public ReadVectorNormal ( ) : Vector
return Vector

Reset() public method

Rewinds the bitstream so it can be read again.
public Reset ( ) : void
return void

bf_read() public method

public bf_read ( int index )
index int