Skip to main content

JoinServerGameModeBase

An abstract class in Root.Township, the global namespace.

Base for client game modes that join a server. Sets up the client's network scene for the server connection.

Constructors​

MemberWhat it is
protected JoinServerGameModeBase()Creates a JoinServerGameModeBase with default values.

Fields​

MemberWhat it is
protected Connection connectionConnection to the server.

Properties​

MemberWhat it is
override bool IsClient { get; }Always true.
override bool IsServer { get; }Always false.

Methods​

MemberWhat it is
protected void Empty(Connection connection, Stream stream)Writes nothing. Used as the body of messages that carry no data.
protected async Task SetupClientScene(JoinResult result)Initializes the current network scene with the connection's socket and adds the connection to it.
1 private and internal method
MemberWhat it is
private void DisconnectedFromServer(ISocket obj)Clears JoinedServerInfo.Current when the socket is destroyed.