A static class in Root.Township, Alta.Networking.
Writes or reads which entity a message is about, by identifier. Other messages such as MoveMessage and DestroyMessage start with it.
Fields
2 private and internal fields
| Member | What it is |
|---|
private static INetworkEntity entity | Backing field for Entity. |
private static uint entityIdentifier | Backing field for EntityIdentifier. |
Properties
| Member | What it is |
|---|
static INetworkEntity Entity { get; } | The entity of the current message; on read, looked up in the current scene (null if not spawned). |
static uint EntityIdentifier { get; } | The identifier of the current message's entity, 0 for none. |
Methods
| Member | What it is |
|---|
static void Serialize(IConnection connection, Stream stream) | Writes or reads the identifier and, on read, looks up the entity. |
static void Set(INetworkEntity entity) | Sets the entity for the next message. |