本文整理汇总了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 ();
}
示例2: OnFailedToConnect
void OnFailedToConnect(NetworkConnectionError error)
{
if(Preloading)
Preloading.SetActive(false);
if (TextInfo)
TextInfo.text = error.ToString ();
}
示例3: OnFailedToConnect
void OnFailedToConnect(NetworkConnectionError info)
{
Log(info.ToString());
}
示例4: OnFailedToConnect
private void OnFailedToConnect(NetworkConnectionError connectionError)
{
this.connectionError = connectionError.ToString();
}
示例5: OnFailedToConnect
void OnFailedToConnect( NetworkConnectionError error )
{
Debug.Log( "Failed to connect: " + error.ToString() ); // при ошибке подключения к серверу выводим саму ошибку
}
示例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++;
}
示例7: OnFailedToConnect
public void OnFailedToConnect( NetworkConnectionError _info )
{
this.StartMessagePopup( _info.ToString(), "Close" );
this.state = STATE.MAIN;
}
示例8: OnFailedToConnect
void OnFailedToConnect(NetworkConnectionError error)
{
Debug.Log("OnFailedToConnect " + error);
connectionError = error;
connectionErrorMsg = error.ToString();
guiMode = GUIDrawMode.ConnectionError;
connecting = false;
}
示例9: OnFailedToConnect
void OnFailedToConnect(NetworkConnectionError error)
{
printC(lc.clnt .ToString() + error.ToString().Replace("InvalidPassword", lc.gald .ToString()));
}
示例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);
}
*/
}
示例11: OnFailedToConnect
// Message from Network
void OnFailedToConnect(NetworkConnectionError error)
{
LogError("Impossible de se connecter au serveur " + data.gameIp[0] + " ; " + error.ToString());
}
示例12: OnFailedToConnect
// 서버 접속에 실패했다.
void OnFailedToConnect(NetworkConnectionError error)
{
Debug.Log("FailedToConnect: " + error.ToString());
status = Status.ConnectToServerFailed;
}
示例13: OnFailedToConnect
void OnFailedToConnect(NetworkConnectionError error)
{
// If we can't connect, tell the user why
errorText.text = "Error: "+error.ToString()+"\n" +errorText.text;
}
示例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:
//.........这里部分代码省略.........
示例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());
}