C# Класс SharpMod.Message

A wrapper class for sending messages with the goldsrc engine
Показать файл Открыть проект

Открытые методы

Метод Описание
Begin ( MessageDestination destination, int messageType, IntPtr floatValue, IntPtr playerEntity ) : void

Begins with the sending of a message.

End ( ) : void

Signals the engine that the message is *constructed* and that it can be send.

GetUserMessageID ( string name ) : int

Calls the Engine to retrieve the User Message ID

GetUserMessageName ( int id ) : string
Intercept ( int id, Delegate del ) : bool
Intercept ( string name, Delegate del ) : bool
Register ( string name, int size ) : int
Write ( Entity entity ) : void
Write ( byte val ) : void

Writes a byte value. If the message buffer is already full, writing will be omitted.

Write ( char val ) : void

Writes a character into the message If the message buffer is already full, writing will be omitted.

Write ( long val ) : void

Writes a long in the message.

Write ( short val ) : void

Writes a short into the message. If the message buffer is already full, writing will be omitted.

Write ( string val ) : void

Writes a string value into the buffer. If the string is too long and would result in a message overflow, it will be truncated.

WriteAngle ( int val ) : void

Writes an angle in the message.

WriteByte ( byte val ) : void

Writes a byte value. If the message buffer is already full, writing will be omitted.

WriteChar ( char val ) : void

Writes a character into the message If the message buffer is already full, writing will be omitted.

WriteCoord ( Vector3f val ) : void
WriteEntity ( Entity entity ) : void
WriteEntity ( int entity ) : void
WriteLong ( int val ) : void
WriteLong ( long val ) : void

Writes a long in the message.

WriteShort ( short val ) : void

Writes a short into the message. If the message buffer is already full, writing will be omitted.

WriteString ( string val ) : void

Writes a string value into the buffer. If the string is too long and would result in a message overflow, it will be truncated.

Приватные методы

Метод Описание
Init ( ) : void
Invoke ( Delegate del, MessageHeader message_header, List parameters ) : void
Invoke ( List list, MessageHeader message_header, List parameters ) : void
Invoke ( MessageHeader message_header, List parameters ) : void
WriteCoord ( float val ) : void

Описание методов

Begin() публичный статический Метод

Begins with the sending of a message.
public static Begin ( MessageDestination destination, int messageType, IntPtr floatValue, IntPtr playerEntity ) : void
destination MessageDestination /// The destination of a message. ///
messageType int
floatValue System.IntPtr
playerEntity System.IntPtr
Результат void

End() публичный статический Метод

Signals the engine that the message is *constructed* and that it can be send.
public static End ( ) : void
Результат void

GetUserMessageID() публичный статический Метод

Calls the Engine to retrieve the User Message ID
public static GetUserMessageID ( string name ) : int
name string /// The name of the message ///
Результат int

GetUserMessageName() публичный статический Метод

public static GetUserMessageName ( int id ) : string
id int
Результат string

Intercept() публичный статический Метод

public static Intercept ( int id, Delegate del ) : bool
id int
del System.Delegate
Результат bool

Intercept() публичный статический Метод

public static Intercept ( string name, Delegate del ) : bool
name string
del System.Delegate
Результат bool

Register() публичный статический Метод

public static Register ( string name, int size ) : int
name string
size int
Результат int

Write() публичный статический Метод

public static Write ( Entity entity ) : void
entity Entity
Результат void

Write() публичный статический Метод

Writes a byte value. If the message buffer is already full, writing will be omitted.
public static Write ( byte val ) : void
val byte /// A byte value. ///
Результат void

Write() публичный статический Метод

Writes a character into the message If the message buffer is already full, writing will be omitted.
public static Write ( char val ) : void
val char /// A character value ///
Результат void

Write() публичный статический Метод

Writes a long in the message.
public static Write ( long val ) : void
val long /// A long value /// If the message buffer is already full, writing will be omitted. ///
Результат void

Write() публичный статический Метод

Writes a short into the message. If the message buffer is already full, writing will be omitted.
public static Write ( short val ) : void
val short /// A character value ///
Результат void

Write() публичный статический Метод

Writes a string value into the buffer. If the string is too long and would result in a message overflow, it will be truncated.
public static Write ( string val ) : void
val string /// A ///
Результат void

WriteAngle() публичный статический Метод

Writes an angle in the message.
public static WriteAngle ( int val ) : void
val int /// An angle value /// If the message buffer is already full, writing will be omitted. ///
Результат void

WriteByte() публичный статический Метод

Writes a byte value. If the message buffer is already full, writing will be omitted.
public static WriteByte ( byte val ) : void
val byte /// A byte value. ///
Результат void

WriteChar() публичный статический Метод

Writes a character into the message If the message buffer is already full, writing will be omitted.
public static WriteChar ( char val ) : void
val char /// A character value ///
Результат void

WriteCoord() публичный статический Метод

public static WriteCoord ( Vector3f val ) : void
val SharpMod.Math.Vector3f
Результат void

WriteEntity() публичный статический Метод

public static WriteEntity ( Entity entity ) : void
entity Entity
Результат void

WriteEntity() публичный статический Метод

public static WriteEntity ( int entity ) : void
entity int
Результат void

WriteLong() публичный статический Метод

public static WriteLong ( int val ) : void
val int
Результат void

WriteLong() публичный статический Метод

Writes a long in the message.
public static WriteLong ( long val ) : void
val long /// A long value /// If the message buffer is already full, writing will be omitted. ///
Результат void

WriteShort() публичный статический Метод

Writes a short into the message. If the message buffer is already full, writing will be omitted.
public static WriteShort ( short val ) : void
val short /// A character value ///
Результат void

WriteString() публичный статический Метод

Writes a string value into the buffer. If the string is too long and would result in a message overflow, it will be truncated.
public static WriteString ( string val ) : void
val string /// A ///
Результат void