mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
rename m_ClientId to clientId
This commit is contained in:
parent
4634f0632e
commit
605c4d471c
@ -9,7 +9,7 @@ public class NetworkClient
|
||||
// the client (can be a regular NetworkClient or a LocalClient)
|
||||
public static NetworkClient singleton;
|
||||
|
||||
int m_ClientId = -1;
|
||||
int clientId = -1;
|
||||
|
||||
public readonly Dictionary<short, NetworkMessageDelegate> handlers = new Dictionary<short, NetworkMessageDelegate>();
|
||||
|
||||
@ -63,7 +63,7 @@ public void Connect(string serverIp)
|
||||
NetworkManager.singleton.transport.ClientConnect(serverIp);
|
||||
|
||||
// setup all the handlers
|
||||
m_Connection = new NetworkConnection(this.serverIp, m_ClientId, 0);
|
||||
m_Connection = new NetworkConnection(this.serverIp, clientId, 0);
|
||||
m_Connection.SetHandlers(handlers);
|
||||
}
|
||||
|
||||
@ -119,7 +119,7 @@ void PrepareForConnect()
|
||||
{
|
||||
active = true;
|
||||
RegisterSystemHandlers(false);
|
||||
m_ClientId = 0;
|
||||
clientId = 0;
|
||||
NetworkManager.singleton.transport.enabled = true;
|
||||
InitializeTransportHandlers();
|
||||
}
|
||||
@ -133,7 +133,7 @@ public virtual void Disconnect()
|
||||
m_Connection.Disconnect();
|
||||
m_Connection.Dispose();
|
||||
m_Connection = null;
|
||||
m_ClientId = -1;
|
||||
clientId = -1;
|
||||
RemoveTransportHandlers();
|
||||
}
|
||||
}
|
||||
@ -164,15 +164,15 @@ public bool Send(short msgType, MessageBase msg)
|
||||
|
||||
public void Shutdown()
|
||||
{
|
||||
if (LogFilter.Debug) Debug.Log("Shutting down client " + m_ClientId);
|
||||
m_ClientId = -1;
|
||||
if (LogFilter.Debug) Debug.Log("Shutting down client " + clientId);
|
||||
clientId = -1;
|
||||
singleton = null;
|
||||
active = false;
|
||||
}
|
||||
|
||||
internal virtual void Update()
|
||||
{
|
||||
if (m_ClientId == -1)
|
||||
if (clientId == -1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user