本文整理汇总了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
}
}
示例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();
}
}
示例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);
}
}
示例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();
}
}
示例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");
}
}
}
示例6: OnDisconnectedFromServer
void OnDisconnectedFromServer(NetworkDisconnection info)
{
isConnected = false;
Debug.Log("Disconnected " + info.ToString());
}
示例7: OnDisconnectedFromServer
void OnDisconnectedFromServer(NetworkDisconnection info)
{
Debug.Log (info.ToString());
Application.LoadLevel("ListePartie");
}
示例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;
}
}
示例9: OnDisconnectedFromServer
// 서버에서 끊어졌다.
void OnDisconnectedFromServer(NetworkDisconnection info)
{
Debug.Log("DisconnectedFromServer: " + info.ToString());
status = Status.DisconnectedFromServer;
Application.LoadLevel(0);
}
示例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");
}
}
}
示例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
}
示例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;
}
}