NetworkClient.isConnected made static

This commit is contained in:
vis2k 2019-03-24 20:13:49 +01:00
parent 604c205025
commit 180d3f8cf4
3 changed files with 3 additions and 3 deletions

View File

@ -392,7 +392,7 @@ public override void OnClientSceneChanged(NetworkConnection conn)
{ {
if (SceneManager.GetActiveScene().name == LobbyScene) if (SceneManager.GetActiveScene().name == LobbyScene)
{ {
if (client.isConnected) if (NetworkClient.isConnected)
CallOnClientEnterLobby(); CallOnClientEnterLobby();
} }
else else

View File

@ -32,7 +32,7 @@ public class NetworkClient
// (= while the network is active) // (= while the network is active)
public static bool active { get; protected set; } public static bool active { get; protected set; }
public bool isConnected => connectState == ConnectState.Connected; public static bool isConnected => connectState == ConnectState.Connected;
public NetworkClient() public NetworkClient()
{ {

View File

@ -546,7 +546,7 @@ public static void UnRegisterStartPosition(Transform start)
public bool IsClientConnected() public bool IsClientConnected()
{ {
return client != null && client.isConnected; return client != null && NetworkClient.isConnected;
} }
// this is the only way to clear the singleton, so another instance can be created. // this is the only way to clear the singleton, so another instance can be created.