mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
NetworkClient: move PrepareForConnect code into Connect
This commit is contained in:
parent
6b6d2b00a5
commit
0e5181f26a
@ -52,10 +52,13 @@ internal void SetHandlers(NetworkConnection conn)
|
||||
|
||||
public void Connect(string ip)
|
||||
{
|
||||
PrepareForConnect();
|
||||
|
||||
if (LogFilter.Debug) { Debug.Log("Client Connect: " + ip); }
|
||||
|
||||
active = true;
|
||||
RegisterSystemHandlers(false);
|
||||
Transport.activeTransport.enabled = true;
|
||||
InitializeTransportHandlers();
|
||||
|
||||
serverIp = ip;
|
||||
|
||||
connectState = ConnectState.Connecting;
|
||||
@ -114,14 +117,6 @@ void OnConnected()
|
||||
else Debug.LogError("Skipped Connect message handling because m_Connection is null.");
|
||||
}
|
||||
|
||||
void PrepareForConnect()
|
||||
{
|
||||
active = true;
|
||||
RegisterSystemHandlers(false);
|
||||
Transport.activeTransport.enabled = true;
|
||||
InitializeTransportHandlers();
|
||||
}
|
||||
|
||||
public virtual void Disconnect()
|
||||
{
|
||||
connectState = ConnectState.Disconnected;
|
||||
|
Loading…
Reference in New Issue
Block a user