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


C# NetworkDisconnection.ToString方法代码示例

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


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

示例1: OnDisconnectedFromServer

 void OnDisconnectedFromServer( NetworkDisconnection info )
 {
     if ( Network.isClient ) {
         Debug.Log( "Disconnected from server: " + info.ToString() ); // при успешном либо не успешном отключении выводим результат
     } else {
         Debug.Log( "Connections closed" ); // выводим при выключении сервера Network.Disconnect
     }
 }
开发者ID:NextGenIntelligence,项目名称:HabrahabrUnityMultiplayer,代码行数:8,代码来源:MultiplayerMenu.cs

示例2: OnDisconnectedFromServer

	void OnDisconnectedFromServer(NetworkDisconnection info) 
	{
		if(MultiPlayer.state != GameState.EndGame) {
			Debug.Log("Server Disconnected.");
			Application.LoadLevel("Menu");
			MultiPlayer.state = GameState.Error;
			MultiPlayer.errorLog = info.ToString();
			MultiPlayer.playerList.Clear();
		}
	}
开发者ID:MizzKii,项目名称:WarB,代码行数:10,代码来源:NetworkControl.cs

示例3: OnDisconnectedFromServer

 //Called on client on player's disconnection
 void OnDisconnectedFromServer(NetworkDisconnection info)
 {
     if (Network.isServer) {
         hostMenu.SetActive(true);
         this.gameObject.SetActive(false);
     }
     else {
         joinMenu.GetComponent<sJoinMenu>().sConnectionErrorMessage = "Disconnected from server: " + info.ToString();
         joinMenu.SetActive(true);
         this.gameObject.SetActive(false);
     }
 }
开发者ID:Bruthur,项目名称:TDProject,代码行数:13,代码来源:sGameLobbyMenu.cs

示例4: OnDisconnectedFromServer

	void OnDisconnectedFromServer(NetworkDisconnection info) 
	{
		/*Debug.Log("DisconnectedFromServer.");
		playerList.Clear();
		state = GameState.Multi;
		//back = true;
		Refresh();*/
		if(state == GameState.Lobby) {
			Debug.Log("DisconnectedFromServer.");
			playerList.Clear();
			state = GameState.Error;
			errorLog = info.ToString();
			//back = true;
			Refresh();
		}
	}
开发者ID:MizzKii,项目名称:WarB,代码行数:16,代码来源:MultiPlayer.cs

示例5: OnDisconnectedFromServer

 void OnDisconnectedFromServer(NetworkDisconnection info)
 {
     if(!LANManager.Instance.rejectedByServer)
     {
         LANManager.Instance.rejectedByServer = !GetComponent<GeneralScriptLAN>().quitAsked;
         LANManager.Instance.errorToDisplay = TextManager.Instance.texts["LAN"]["DISCONNECTED"] + info.ToString();
         if(LANManager.Instance.rejectedByServer)
         {
             Application.LoadLevel("LAN");
         }
     }
 }
开发者ID:BenouKat,项目名称:Unity-ITGHD,代码行数:12,代码来源:NetworkWheelScript.cs

示例6: OnDisconnectedFromServer

 void OnDisconnectedFromServer(NetworkDisconnection info)
 {
     isConnected = false;
     Debug.Log("Disconnected " + info.ToString());
 }
开发者ID:Nidre,项目名称:MogaMecha,代码行数:5,代码来源:Networking.cs

示例7: OnDisconnectedFromServer

 void OnDisconnectedFromServer(NetworkDisconnection info)
 {
     Debug.Log (info.ToString());
     Application.LoadLevel("ListePartie");
 }
开发者ID:frizac-b,项目名称:gladiawar,代码行数:5,代码来源:LevelChanger.cs

示例8: OnDisconnectedFromServer

    void OnDisconnectedFromServer(NetworkDisconnection info)
    {
        Debug.Log("Server connection disconnected: " + info.ToString());
        Debug.Log("Current network peer type is " + Network.peerType.ToString());

        ChangeClientState(ClientState.E_ClientDisconnected);

        if (m_ClientDisconnectedDelegate != null)
        {
            m_ClientDisconnectedDelegate();
            m_ClientDisconnectedDelegate = null;
        }
    }
开发者ID:mhoulier,项目名称:unity3d_template,代码行数:13,代码来源:NetworkClient.cs

示例9: OnDisconnectedFromServer

 // 서버에서 끊어졌다.
 void OnDisconnectedFromServer(NetworkDisconnection info)
 {
     Debug.Log("DisconnectedFromServer: " + info.ToString());
     status = Status.DisconnectedFromServer;
     Application.LoadLevel(0);
 }
开发者ID:gilbutITbook,项目名称:006762,代码行数:7,代码来源:NetworkManager.cs

示例10: OnDisconnectedFromServer

 void OnDisconnectedFromServer(NetworkDisconnection info)
 {
     if(!LANManager.Instance.rejectedByServer)
     {
         LANManager.Instance.rejectedByServer = true;
         LANManager.Instance.errorToDisplay = TextManager.Instance.texts["LAN"]["DISCONNECTED"] + info.ToString();
         if(LANManager.Instance.rejectedByServer)
         {
             Application.LoadLevel("LAN");
         }
     }
 }
开发者ID:BenouKat,项目名称:Unity-ITGHD,代码行数:12,代码来源:NetworkScoreScript.cs

示例11: OnDisconnectedFromServer

 void OnDisconnectedFromServer(NetworkDisconnection info)
 {
     m_isConnected = false;
     IsHost = false;
     Debug.Log("Disconnected from server: " + info.ToString());
     Application.LoadLevel("Tutorial"); // reload scene to reset game; cleaning up scene is too much work
 }
开发者ID:ZachHoefler,项目名称:pokeMMOn,代码行数:7,代码来源:NetworkManager.cs

示例12: OnDisconnectedFromServer

    void OnDisconnectedFromServer(NetworkDisconnection _NetDisconnectionInfo)
    {
        Debug.Log("Server connection disconnected: " + _NetDisconnectionInfo.ToString());
        Debug.Log("Current network peer type is " + Network.peerType.ToString());

        m_ServerStartedDelegate = null;
        m_ServerStoppedDelegate = null;
        m_ClientConnectedDelegate = null;
        m_ClientDisconnectedDelegate = null;

        StopServerAdvertising();

        ChangeServerState(ServerState.E_ServerStopped);

        if (m_ServerStoppedDelegate != null)
        {
            m_ServerStoppedDelegate();
            m_ServerStoppedDelegate = null;
        }
    }
开发者ID:mhoulier,项目名称:unity3d_template,代码行数:20,代码来源:NetworkServer.cs


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