Exemplo n.º 1
0
 /// <summary>
 ///     Attempt to disconnect from the server
 /// </summary>
 public void Disconnect()
 {
     _logger.Info("Disconnecting from server...");
     // Update status and stop client
     Status = ClientStatus.Disconnected;
     _netClient.Stop();
 }
Exemplo n.º 2
0
        /// <summary>
        ///     Stops the server
        /// </summary>
        public void StopServer()
        {
            // Update status and stop the server
            Status = ServerStatus.Stopped;
            _netServer.Stop();

            MultiplayerManager.Instance.PlayerList.Clear();

            CSM.Log("Stopped server");
        }
Exemplo n.º 3
0
        /// <summary>
        ///     Attempt to disconnect from the server
        /// </summary>
        public void Disconnect()
        {
            // Update status and stop client
            Status = ClientStatus.Disconnected;
            _netClient.Stop();
            MultiplayerManager.Instance.PlayerList.Clear();
            TransactionHandler.ClearTransactions();

            _logger.Info("Disconnected from server");
        }
Exemplo n.º 4
0
        /// <summary>
        ///     Stops the server
        /// </summary>
        public void StopServer()
        {
            // Update status and stop the server
            Status = ServerStatus.Stopped;
            _netServer.Stop();

            MultiplayerManager.Instance.PlayerList.Clear();
            TransactionHandler.ClearTransactions();

            _logger.Info("Server stopped.");
        }
Exemplo n.º 5
0
        /// <summary>
        ///     Attempt to disconnect from the server
        /// </summary>
        public void Disconnect()
        {
            bool needsUnload = (Status == ClientStatus.Connected);

            // Update status and stop client
            Status = ClientStatus.Disconnected;
            _netClient.Stop();
            MultiplayerManager.Instance.PlayerList.Clear();
            TransactionHandler.ClearTransactions();
            ToolSimulator.Clear();

            if (needsUnload)
            {
                // Go back to the main menu after disconnecting
                Singleton <LoadingManager> .instance.UnloadLevel();
            }

            _logger.Info("Disconnected from server");
        }
Exemplo n.º 6
0
 /// <summary>
 ///     Attempt to disconnect from the server
 /// </summary>
 public void Disconnect()
 {
     // Update status and stop client
     Status = ClientStatus.Disconnected;
     _netClient.Stop();
 }