Simulation Message More...
Inherits ILogDumpable.
Public Member Functions | |
void ILogDumpable. | Dump (StringBuilder builder) |
bool | GetFlag (int flag) |
Get if a flag is set on this SimulationMessage More... | |
bool | IsTargeted () |
Signal if this SimulationMessage is Targeted More... | |
void | ReferenceCountAdd () |
Add a reference to this SimulationMessage More... | |
bool | ReferenceCountSub () |
Subtract a reference from this SimulationMessage More... | |
void | SetDummy () |
Set this SimulationMessage as Dummy More... | |
void | SetNotTickAligned () |
Set this SimulationMessage as Not Tick Aligned More... | |
void | SetStatic () |
Set this SimulationMessage as Static More... | |
void | SetTarget (PlayerRef target) |
Set the player target of this SimulationMessage More... | |
void | SetUnreliable () |
Set this SimulationMessage as Unreliable More... | |
override string | ToString () |
Simulation Message ToString More... | |
string | ToString (bool useBrackets) |
Simulation Message ToString More... | |
Static Public Member Functions | |
static SimulationMessage * | Allocate (Simulation sim, int capacityInBytes) |
Allocate a new SimulationMessage More... | |
static bool | CanAllocateUserPayload (int capacityInBytes) |
Checks if a message with given size can be allocated. More... | |
static SimulationMessage * | Clone (Simulation sim, SimulationMessage *message) |
Create a copy of a SimulationMessage More... | |
static byte * | GetData (SimulationMessage *message) |
Get the byte pointer content of a SimulationMessage More... | |
static int | ReadInt (SimulationMessage *message) |
Read a int from a SimulationMessage More... | |
static NetworkId | ReadNetworkedObjectRef (SimulationMessage *message) |
Read a NetworkId from a SimulationMessage More... | |
static Vector3 | ReadVector3 (SimulationMessage *message) |
Read a Vector3 from a SimulationMessage More... | |
static void | WriteInt (SimulationMessage *message, int value) |
Write a int to a SimulationMessage More... | |
static void | WriteNetworkedObjectRef (SimulationMessage *message, NetworkId value) |
Write a NetworkId to a SimulationMessage More... | |
static void | WriteVector3 (SimulationMessage *message, Vector3 value) |
Write a Vector3 to a SimulationMessage More... | |
Public Attributes | |
int | Capacity |
Capacity in Bits of this SimulationMessage More... | |
int | Flags |
Flags More... | |
int | Offset |
Current offset in Bits More... | |
int | References |
Reference Count More... | |
PlayerRef | Source |
Source Player of this SimulationMessage More... | |
PlayerRef | Target |
Target Player of this SimulationMessage More... | |
int | Tick |
Tick of this SimulationMessage More... | |
Static Public Attributes | |
const int | FLAG_DUMMY = 1 << 8 |
Flag for dummy messages. More... | |
const int | FLAG_INTERNAL = 1 << 6 |
Flag for internal messages. More... | |
const int | FLAG_NOT_TICK_ALIGNED = 1 << 7 |
Flag for messages that are not tick aligned. More... | |
const int | FLAG_REMOTE = 1 << 1 |
Flag for remote messages. More... | |
const int | FLAG_STATIC = 1 << 2 |
Flag for static messages. More... | |
const int | FLAG_TARGET_PLAYER = 1 << 4 |
Flag for targeted messages to a player. More... | |
const int | FLAG_TARGET_SERVER = 1 << 5 |
Flag for targeted messages to the server. More... | |
const int | FLAG_UNRELIABLE = 1 << 3 |
Flag for unreliable messages. More... | |
const int | FLAG_USER_FLAGS_START = 1 << 16 |
Flag for user flags. More... | |
const int | FLAG_USER_MESSAGE = 1 << 0 |
Flag for user messages. More... | |
const int | FLAGS_RESERVED = 0xFFFF |
Flag for reserved flags. More... | |
const int | FLAGS_RESERVED_BITS = 16 |
Flag for reserved bits. More... | |
const int | MAX_PAYLOAD_SIZE = 512 |
Max user message size in bytes. More... | |
const int | SIZE = 28 |
SimulationMessage size in bytes. More... | |
Properties | |
bool | IsUnreliable [get] |
Signal if this SimulationMessage is Unreliable More... | |
Simulation Message
|
static |
Allocate a new SimulationMessage
sim | Simulation to get the Memory from |
capacityInBytes | Size in bytes of the new SimulationMessage |
|
static |
Checks if a message with given size can be allocated.
|
static |
Create a copy of a SimulationMessage
sim | Simulation to allocate from |
message | SimulationMessage to copy |
|
static |
Get the byte pointer content of a SimulationMessage
message | SimulationMessage to get the byte pointer of |
bool GetFlag | ( | int | flag | ) |
Get if a flag is set on this SimulationMessage
flag | Flag to check |
bool IsTargeted | ( | ) |
Signal if this SimulationMessage is Targeted
|
static |
Read a int from a SimulationMessage
message | SimulationMessage to read from |
|
static |
Read a NetworkId from a SimulationMessage
message | SimulationMessage to read from |
|
static |
Read a Vector3 from a SimulationMessage
message | SimulationMessage to read from |
void ReferenceCountAdd | ( | ) |
Add a reference to this SimulationMessage
bool ReferenceCountSub | ( | ) |
Subtract a reference from this SimulationMessage
void SetDummy | ( | ) |
Set this SimulationMessage as Dummy
void SetNotTickAligned | ( | ) |
Set this SimulationMessage as Not Tick Aligned
void SetStatic | ( | ) |
Set this SimulationMessage as Static
void SetTarget | ( | PlayerRef | target | ) |
Set the player target of this SimulationMessage
target | Target Player |
void SetUnreliable | ( | ) |
Set this SimulationMessage as Unreliable
override string ToString | ( | ) |
Simulation Message ToString
string ToString | ( | bool | useBrackets | ) |
Simulation Message ToString
|
static |
Write a int to a SimulationMessage
message | SimulationMessage to write to |
value | int to write |
|
static |
Write a NetworkId to a SimulationMessage
message | SimulationMessage to write to |
value | NetworkId to write |
|
static |
Write a Vector3 to a SimulationMessage
message | SimulationMessage to write to |
value | Vector3 to write |
int Capacity |
Capacity in Bits of this SimulationMessage
|
static |
Flag for dummy messages.
|
static |
Flag for internal messages.
|
static |
Flag for messages that are not tick aligned.
|
static |
Flag for remote messages.
|
static |
Flag for static messages.
|
static |
Flag for targeted messages to a player.
|
static |
Flag for targeted messages to the server.
|
static |
Flag for unreliable messages.
|
static |
Flag for user flags.
|
static |
Flag for user messages.
int Flags |
Flags
|
static |
Flag for reserved flags.
|
static |
Flag for reserved bits.
|
static |
Max user message size in bytes.
int Offset |
Current offset in Bits
int References |
Reference Count
|
static |
SimulationMessage size in bytes.
PlayerRef Source |
Source Player of this SimulationMessage
PlayerRef Target |
Target Player of this SimulationMessage
int Tick |
Tick of this SimulationMessage
|
get |
Signal if this SimulationMessage is Unreliable