Skip to main content

ControlledWriteSync

A class in Root.Township, Alta.Networking.

An entity message channel where each send passes its own write method, unlike MethodSync which uses a fixed one. Registers the read handler when created.

Constructors​

MemberWhat it is
ControlledWriteSync(NetworkEntity entity, EntityMessageType type, SerializeMethod handler)Creates a ControlledWriteSync from entity, type and handler.

Fields​

2 private and internal fields
MemberWhat it is
private NetworkEntity entityThe entity whose message handler carries the messages.
private EntityMessageType typeThe entity message type this sync uses.

Methods​

MemberWhat it is
void SendToChunks(SerializeMethod sendMethod, params Player[] except)Sends the message, written by the given method, to every player in range of the entity's chunks, minus any listed.
void SendToPlayer(Player player, SerializeMethod sendMethod)Sends the message, written by the given method, to one player.

Used in​

Members of other types that take, return or hold a ControlledWriteSync: