当前位置: 首页>>代码示例>>C#>>正文


C# NetworkConnectionError.ToString方法代码示例

本文整理汇总了C#中NetworkConnectionError.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# NetworkConnectionError.ToString方法的具体用法?C# NetworkConnectionError.ToString怎么用?C# NetworkConnectionError.ToString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在NetworkConnectionError的用法示例。


在下文中一共展示了NetworkConnectionError.ToString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnFailedToConnectToMasterServer

    void OnFailedToConnectToMasterServer(NetworkConnectionError info)
    {
        if(Preloading)
            Preloading.SetActive(false);

        if (TextInfo)
            TextInfo.text = info.ToString ();
    }
开发者ID:sparxcrossroads,项目名称:UnitZ,代码行数:8,代码来源:ConnectingEvent.cs

示例2: OnFailedToConnect

    void OnFailedToConnect(NetworkConnectionError error)
    {
        if(Preloading)
            Preloading.SetActive(false);

        if (TextInfo)
            TextInfo.text = error.ToString ();
    }
开发者ID:sparxcrossroads,项目名称:UnitZ,代码行数:8,代码来源:ConnectingEvent.cs

示例3: OnFailedToConnect

 void OnFailedToConnect(NetworkConnectionError info)
 {
     Log(info.ToString());
 }
开发者ID:vonhacker,项目名称:counterstrike,代码行数:4,代码来源:MClass.cs

示例4: OnFailedToConnect

 private void OnFailedToConnect(NetworkConnectionError connectionError)
 {
     this.connectionError = connectionError.ToString();
 }
开发者ID:golergka,项目名称:KingOfCastles,代码行数:4,代码来源:DTRM.cs

示例5: OnFailedToConnect

 void OnFailedToConnect( NetworkConnectionError error )
 {
     Debug.Log( "Failed to connect: " + error.ToString() ); // при ошибке подключения к серверу выводим саму ошибку
 }
开发者ID:NextGenIntelligence,项目名称:HabrahabrUnityMultiplayer,代码行数:4,代码来源:MultiplayerMenu.cs

示例6: OnFailedToConnect

 void OnFailedToConnect(NetworkConnectionError error)
 {
     if (autoRetryCount <= retryCount) {
         SetStatusText ("Connection to server failed\nError: " + error.ToString() + "\nretry #" + autoRetryCount);
         runRetry = true;
         retryTimer = retryMinTime + (Mathf.Min(autoRetryCount * retryMinTime, retryMaxTime));
     } else {
         //retry count max reached, stop
         SetStatusText ("Connection to server failed\nError: " + error.ToString() + "\nmax retries reached #" + autoRetryCount);
         autoRetryCount = 0;		//reset for next call to Connect();
     }
     autoRetryCount++;
 }
开发者ID:kevinta893,项目名称:UnityTools,代码行数:13,代码来源:NetworkStarter.cs

示例7: OnFailedToConnect

 public void OnFailedToConnect( NetworkConnectionError _info )
 {
     this.StartMessagePopup( _info.ToString(), "Close" );
     this.state = STATE.MAIN;
 }
开发者ID:marshl,项目名称:Leviathan2,代码行数:5,代码来源:MenuGUI.cs

示例8: OnFailedToConnect

    void OnFailedToConnect(NetworkConnectionError error)
    {
        Debug.Log("OnFailedToConnect " + error);

        connectionError = error;
        connectionErrorMsg = error.ToString();
        guiMode = GUIDrawMode.ConnectionError;

        connecting = false;
    }
开发者ID:Cidolfas,项目名称:CidUtils-Examples,代码行数:10,代码来源:NetworkingChaseWorldManager.cs

示例9: OnFailedToConnect

 void OnFailedToConnect(NetworkConnectionError error)
 {
     printC(lc.clnt .ToString() + error.ToString().Replace("InvalidPassword", lc.gald .ToString()));
 }
开发者ID:ConnectDeveloper01,项目名称:dorumon,代码行数:4,代码来源:Menu.cs

示例10: OnFailedToConnectToMasterServer

    // Message from MasterServer
    void OnFailedToConnectToMasterServer(NetworkConnectionError error)
    {
        LogError("Le MasterServer ne repond pas. Listage des parties impossible : " + error.ToString());

        /*
         * BUG: Masterserver n'est plus op après une erreur
        if (MasterServerIpCounter > data.masterServerIp.Length)
            LogError("Le MasterServer ne repond pas sur aucune adresse. Listage des parties impossible : " + error.ToString());
        else
        {
            string newIP = data.masterServerIp[MasterServerIpCounter];

            LogWarning("Impossible de joindre le MasterServer sur " + MasterServer.ipAddress + " : Nouvelle tentative sur " + newIP);
            MasterServer.ipAddress = newIP;
            ++MasterServerIpCounter;
            MasterServer.ClearHostList();
            MasterServer.RequestHostList(data.gameType);
        }
        */
    }
开发者ID:frizac-b,项目名称:gladiawar,代码行数:21,代码来源:GamesManager.cs

示例11: OnFailedToConnect

 // Message from Network
 void OnFailedToConnect(NetworkConnectionError error)
 {
     LogError("Impossible de se connecter au serveur " + data.gameIp[0] + " ; " + error.ToString());
 }
开发者ID:frizac-b,项目名称:gladiawar,代码行数:5,代码来源:GamesManager.cs

示例12: OnFailedToConnect

 // 서버 접속에 실패했다.
 void OnFailedToConnect(NetworkConnectionError error)
 {
     Debug.Log("FailedToConnect: " + error.ToString());
     status = Status.ConnectToServerFailed;
 }
开发者ID:gilbutITbook,项目名称:006762,代码行数:6,代码来源:NetworkManager.cs

示例13: OnFailedToConnect

 void OnFailedToConnect(NetworkConnectionError error)
 {
     // If we can't connect, tell the user why
     errorText.text = "Error: "+error.ToString()+"\n" +errorText.text;
 }
开发者ID:bruteostrich,项目名称:GnomeArena,代码行数:5,代码来源:NetworkManager.cs

示例14: MainMenuWindow

    void MainMenuWindow(int windowID)
    {
        if (connecting) GUI.enabled = false;

        guiMainMode = GUILayout.Toolbar (guiMainMode, guiMainCategories);

        GUILayout.Space (15);

        switch (guiMainMode) {
        case 0:
            GUILayout.Label ("Enter your player name");
            m_playerName = GUILayout.TextField (m_playerName);

            if (Application.isWebPlayer == false && Application.isEditor == false) {
                GUILayout.Space (5);

                if (GUILayout.Button ("Exit Game", GUILayout.Height (60))) {
                    Application.Quit ();
                }
            }
            break;

        case 1:
            GUILayout.Label ("Enter a name for your server");
            m_serverName = GUILayout.TextField (m_serverName);

            GUILayout.Space (5);

            GUILayout.Label ("Server Port");
            m_serverPort = int.Parse (GUILayout.TextField (m_serverPort.ToString ()));

            GUILayout.Space (5);

            GUILayout.Label ("Max Players");
            m_serverPlayerLimit = int.Parse (GUILayout.TextField (m_serverPlayerLimit.ToString ()));

            GUILayout.Space (5);

            GUILayout.Label ("Put in a password for your server (optional)");
            m_serverPassword = GUILayout.TextField (m_serverPassword);

            GUILayout.Space (5);

            m_serverDedicated = GUILayout.Toggle (m_serverDedicated, "Dedicated Server?");

            GUILayout.Space (10);

            if (GUILayout.Button ("Start my server", GUILayout.Height (25))) {
                connecting = true;

                connectionError = StartServer ();

                switch (connectionError) {
                case NetworkConnectionError.NoError:
                    break;

                default:
                    connectionErrorMsg = connectionError.ToString();
                    guiMode = GUIDrawMode.ConnectionError;
                    break;
                }
            }
            break;

        case 2:
            GUILayout.Label ("Type in Server IP");
            m_joinServerIP = GUILayout.TextField (m_joinServerIP);

            GUILayout.Space (5);

            GUILayout.Label ("Server Port");
            m_joinServerPort = int.Parse (GUILayout.TextField (m_joinServerPort.ToString ()));

            GUILayout.Space (5);

            GUILayout.Label("Server Password");
            m_joinServerPassword = GUILayout.TextField (m_joinServerPassword);

            GUILayout.Space (10);

            if (GUILayout.Button ("Connect", GUILayout.Height (25))) {
                connecting = true;

                connectionError = JoinServerByIP ();

                Debug.Log(connectionError);

                switch (connectionError) {
                case NetworkConnectionError.NoError:
                    break;

                default:
                    connectionErrorMsg = connectionError.ToString();
                    guiMode = GUIDrawMode.ConnectionError;
                    break;
                }
            }
            break;

        default:
//.........这里部分代码省略.........
开发者ID:Cidolfas,项目名称:CidUtils-Examples,代码行数:101,代码来源:NetworkingChaseWorldManager.cs

示例15: OnFailedToConnectToMasterServer

 void OnFailedToConnectToMasterServer(NetworkConnectionError error)
 {
     // TODO: We should probably do stuff here someday
     Debug.Log("Failed to connect to the master server! " + error.ToString());
 }
开发者ID:Gamieon,项目名称:UniNetShooter,代码行数:5,代码来源:MasterServerDirector.cs


注:本文中的NetworkConnectionError.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。