Skip to main content

PlayerTextMessage

A struct in Root.Township, the global namespace.

A text message and how long to show it, sent from the server to one player by PlayerCommunicationManager.

Constructors​

MemberWhat it is
PlayerTextMessage(string message, float displayDuration)Creates a PlayerTextMessage from message and displayDuration.

Fields​

2 private and internal fields
MemberWhat it is
private float displayDurationBacking field for DisplayDuration.
private string messageBacking field for Message.

Properties​

MemberWhat it is
float DisplayDuration { get; }How long the message stays on screen, in seconds (synced in 0.1 s steps, up to 100).
string Message { get; }The message text.

Methods​

MemberWhat it is
void Serialize(IPlayer player, Stream stream)Reads or writes the message and duration on the network stream.

Used in​

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