Exemplo n.º 1
0
        private void ProcessWelcomePacket(Packet packet)
        {
            Action action = () =>
            {
                int myPlayerId = packet.ReadInt();
                connectionToServer.FinishConnection(myPlayerId);

                Logger.LogEvent(LoggerSection.Connection, $"Connected successfully to server. My player id is {myPlayerId}");
            };

            networkSimulation.ReceiveThroughNetwork(action);
        }