Beispiel #1
0
    void InitNetwork()
    {
        WSServerState.Reset();

        if (DebugStandalone)
        {
            WSServer.Stop();
            WSServerState.Reset();
            WSClient.Disconnect();
            WSClientState.Reset();
            WSServer.StartFake();
            WSClient.ConnectFake();
        }
        else if (IsClient)
        {
            WSServer.Stop();
            WSServerState.Reset();
            WSClient.Connect();
        }
        else
        {
            WSClient.Disconnect();
            WSClientState.Reset();
            if (!WSServer.IsRunning)
            {
                WSServer.Start();
            }
        }
    }