more sorting

This commit is contained in:
vis2k 2021-03-07 15:22:00 +08:00
parent 84f5ea61cc
commit 688ec28d5d

View File

@ -81,6 +81,14 @@ static void Initialize()
AddTransportHandlers();
}
static void AddTransportHandlers()
{
Transport.activeTransport.OnServerConnected = OnConnected;
Transport.activeTransport.OnServerDataReceived = OnDataReceived;
Transport.activeTransport.OnServerDisconnected = OnDisconnected;
Transport.activeTransport.OnServerError = OnError;
}
public static void ActivateHostScene()
{
foreach (NetworkIdentity identity in NetworkIdentity.spawned.Values)
@ -339,14 +347,6 @@ public static void SendToClientOfPlayer<T>(NetworkIdentity identity, T msg, int
}
// transport events ////////////////////////////////////////////////////
static void AddTransportHandlers()
{
Transport.activeTransport.OnServerConnected = OnConnected;
Transport.activeTransport.OnServerDataReceived = OnDataReceived;
Transport.activeTransport.OnServerDisconnected = OnDisconnected;
Transport.activeTransport.OnServerError = OnError;
}
static void OnConnected(int connectionId)
{
// Debug.Log("Server accepted client:" + connectionId);