コード例 #1
0
 void OnConnectToServerFailed(uLink.NetworkConnectionError error)
 {
     Popup.Hide();
     Popup.Show(TextDatabase.instance[0109061],
                TextDatabase.instance[0109062] + "\n (" + error.ToString() + ")",
                TextDatabase.instance[02040009],
                OnMessageBoxEvent);
 }
コード例 #2
0
    static void OnConnectToServerFailed(uLink.NetworkConnectionError reason)
    {
        if (JoiningMessageBox != null)
        {
            JoiningMessageBox.ForceClose();
            JoiningMessageBox = null;
        }

        ShowMessageBox("Network error", "Unable to join server (" + reason + ")", GoToMainMenu);
    }
コード例 #3
0
ファイル: MenuGUI.cs プロジェクト: Leonhartz/Client
	void BusyGUI()
	{
		GUILayout.BeginVertical();
		GUILayout.Space(5);
		GUILayout.EndVertical();

		GUILayout.BeginHorizontal();
		GUILayout.FlexibleSpace();

		if (lastError != uLink.NetworkConnectionError.NoError)
		{
			GUILayout.Label("Error: " + lastError);
		}
		else if (uLink.Network.status == uLink.NetworkStatus.Connected)
		{
			GUILayout.Label("Instantiating...");
		}
		else if (uLink.Network.status == uLink.NetworkStatus.Connecting)
		{
			GUILayout.Label((client.isRedirected ? "Redirecting to " : "Connecting to ") + uLink.NetworkPlayer.server.endpoint);
		}
		else if (uLink.Network.status == uLink.NetworkStatus.Disconnecting)
		{
			GUILayout.Label("Disconnecting");
		}

		GUILayout.FlexibleSpace();
		GUILayout.EndHorizontal();

		if (uLink.Network.status == uLink.NetworkStatus.Connecting && !client.isRedirected)
		{
			GUILayout.BeginVertical();
			GUILayout.Space(5);
			GUILayout.EndVertical();

			GUILayout.BeginHorizontal();
			GUILayout.FlexibleSpace();

			if (GUILayout.Button("Cancel", GUILayout.Width(80), GUILayout.Height(25)))
			{
				uLink.Network.DisconnectImmediate();
				lastError = uLink.NetworkConnectionError.NoError;
			}

			GUILayout.FlexibleSpace();
			GUILayout.EndHorizontal();
		}

		GUILayout.BeginVertical();
		GUILayout.Space(5);
		GUILayout.EndVertical();
	}
 /// <summary>
 /// Message callback: Called on the sender side when a <see cref="Connect(uLink.NetworkPeer)"/> was invoked and has failed.
 /// </summary>
 /// <remarks>
 /// Remark about the connection timeout for P2P connections: A connection attempt will be
 /// done every 2.5 seconds, 5 times in a row. After that, at around 12.5 seconds, this
 /// callback will be triggered with a uLink.NetworkConnectionError.ConnectionTimeout.
 /// </remarks>
 public void uLink_OnFailedToConnectToPeer(uLink.NetworkConnectionError error)
 {
 }
コード例 #5
0
ファイル: MenuGUI.cs プロジェクト: smarthaert/talimare
 void uLink_OnFailedToConnect(uLink.NetworkConnectionError error)
 {
     lastError = error;
 }
コード例 #6
0
ファイル: MenuGUI.cs プロジェクト: smarthaert/talimare
    void BusyGUI()
    {
        GUILayout.BeginVertical();
        GUILayout.Space(5);
        GUILayout.EndVertical();

        GUILayout.BeginHorizontal();
        GUILayout.FlexibleSpace();

        if (lastError != uLink.NetworkConnectionError.NoError)
        {
            GUILayout.Label("Error: " + lastError);
        }
        else if (uLink.Network.status == uLink.NetworkStatus.Connected)
        {
            GUILayout.Label("Instantiating...");
        }
        else if (uLink.Network.status == uLink.NetworkStatus.Connecting)
        {
            GUILayout.Label((client.isRedirected ? "Redirecting to " : "Connecting to ") + uLink.NetworkPlayer.server.endpoint);
        }
        else if (uLink.Network.status == uLink.NetworkStatus.Disconnecting)
        {
            GUILayout.Label("Disconnecting");
        }

        GUILayout.FlexibleSpace();
        GUILayout.EndHorizontal();

        if (uLink.Network.status == uLink.NetworkStatus.Connecting && !client.isRedirected)
        {
            GUILayout.BeginVertical();
            GUILayout.Space(5);
            GUILayout.EndVertical();

            GUILayout.BeginHorizontal();
            GUILayout.FlexibleSpace();

            if (GUILayout.Button("Cancel", GUILayout.Width(80), GUILayout.Height(25)))
            {
                uLink.Network.DisconnectImmediate();
                lastError = uLink.NetworkConnectionError.NoError;
            }

            GUILayout.FlexibleSpace();
            GUILayout.EndHorizontal();
        }

        GUILayout.BeginVertical();
        GUILayout.Space(5);
        GUILayout.EndVertical();
    }
コード例 #7
0
 public void uLink_OnFailedToConnect(uLink.NetworkConnectionError error)
 {
     MessageLog.AddMessage("Failed to connect: " + error);
     TryingToConnect = false;
 }
コード例 #8
0
ファイル: MenuGUI.cs プロジェクト: Leonhartz/Client
	void uLink_OnFailedToConnect(uLink.NetworkConnectionError error)
	{
		lastError = error;
	}
コード例 #9
0
 void uLink_OnFailedToConnectToServer(uLink.NetworkConnectionError error)
 {
     failedToConnectToServer = true;
     connectionError         = error;
     isConnectingToServer    = false;
 }
コード例 #10
0
    void uLink_OnFailedToConnect(uLink.NetworkConnectionError error)
    {
        MessageBox_N.CancelMask(MsgInfoType.ServerLoginMask);

        if (LogFilter.logDebug)
        {
            Debug.LogErrorFormat("Failed to connect:{0}", error);
        }

        if (null != OnFailedConnectEvent)
        {
            OnFailedConnectEvent();
        }

        switch (error)
        {
        case uLink.NetworkConnectionError.InvalidPassword:
        {
            MessageBox_N.ShowOkBox(PELocalization.GetString(8000037));
        }
        break;

        case uLink.NetworkConnectionError.RSAPublicKeyMismatch:
        {
            MessageBox_N.ShowOkBox(PELocalization.GetString(8000045));
        }
        break;

        case uLink.NetworkConnectionError.ConnectionBanned:
        {
            MessageBox_N.ShowOkBox(PELocalization.GetString(8000046));
        }
        break;

        case uLink.NetworkConnectionError.LimitedPlayers:
        {
            MessageBox_N.ShowOkBox(PELocalization.GetString(8000826));
        }
        break;

        case (uLink.NetworkConnectionError) 200:
        {
            // Incompatible record version
            MessageBox_N.ShowOkBox(PELocalization.GetString(8000754));
        }
        break;

        case (uLink.NetworkConnectionError) 201:
        {
            // Server had a fatal error
            MessageBox_N.ShowOkBox(PELocalization.GetString(8000755));
        }
        break;

        case (uLink.NetworkConnectionError) 202:
        {
            // full custom player in custom mode
            MessageBox_N.ShowOkBox(PELocalization.GetString(8000827));
        }
        break;

        default:
        {
            MessageBox_N.ShowYNBox(PELocalization.GetString(8000502), Connect);
        }
        break;
        }
    }
コード例 #11
0
 void uLink_OnFailedToConnect(uLink.NetworkConnectionError error)
 {
     connecting = false;
     Debug.Log("Failed to connect to the game server. Retrying...");
 }
コード例 #12
0
 void uLink_OnFailedToConnect(uLink.NetworkConnectionError error)
 {
     Debug.LogError("uLink got error: " + error);
 }