Skip to main content

LocalTestGameMode

A class in Root.Township, the global namespace.

Game mode that runs a server in the same process and joins it as a client, for local testing. Started from the menu with an IServerAccess.

Constructors​

MemberWhat it is
LocalTestGameMode(IServerAccess serverAccess)Creates a LocalTestGameMode from serverAccess.

Fields​

1 private and internal field
MemberWhat it is
private IServerAccess serverAccessServer details the local server is started with.

Properties​

MemberWhat it is
override bool IsServer { get; }Always true; this process is the server.

Methods​

MemberWhat it is
override async Task<bool> ActivateAsync()Loads the game scene, starts a local server on port 1757, connects to it and sets up the client scene. Returns false on failure.
override async Task StopModeAsync(string reason)Fades out, disconnects, stops the local server and the network, and clears IsLocalTest.