Exemple #1
0
        private void SendPlayerInformation(Player player, ClientConnection connection, string token)
        {
            var currentConnection = _socketRepository.GetConnection(player.Id);

            if (currentConnection != null)
            {
                _loginSender.Logout(currentConnection);
            }

            _socketRepository.AddConnection(player.Id, connection);
            //_positionRepository.SetPlayerPosition(player, player.Node);

            _loginSender.Success(player, token);
            _joinSender.Join(player);
            _locationSender.Update(player.Node);
        }