Пример #1
0
 void OnNetAgentIsReadyToPlay(NetworkConnection conn, NetAgentIsReadyToPlayNetEvent e)
 {
     if (_server.Connection != conn)
     {
         return;
     }
     _server.IsReady = true;
     OnServerReadyToPlay?.Invoke();
     Debug.Log($"Client: set server as ready {conn.connectionId}");
 }
        void OnNetAgentIsReadyToPlay(NetworkConnection conn, NetAgentIsReadyToPlayNetEvent e)
        {
            var client = Clients.Find(x => x.Connection == conn);

            if (client == null)
            {
                Debug.Log($"Server: Can't set client as ready - client not found {conn.address}");
                return;
            }
            client.IsReady = true;
            TrySendServerReadyMessage();
        }