mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
NetworkClient.isConnected made static
This commit is contained in:
parent
604c205025
commit
180d3f8cf4
@ -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
|
||||||
|
@ -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()
|
||||||
{
|
{
|
||||||
|
@ -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.
|
||||||
|
Loading…
Reference in New Issue
Block a user