本文整理汇总了C#中DisconnectCause类的典型用法代码示例。如果您正苦于以下问题:C# DisconnectCause类的具体用法?C# DisconnectCause怎么用?C# DisconnectCause使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DisconnectCause类属于命名空间,在下文中一共展示了DisconnectCause类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnFailedToConnectToPhoton
public override void OnFailedToConnectToPhoton(DisconnectCause Cause)
{
base.OnFailedToConnectToPhoton(Cause);
Debug.Log("OnFailedToConnectToPhoton "+Cause);
// back to main menu or fisrt scene
Application.LoadLevel(OnDisconnectReturn);
}
示例2: OnFailedToConnectToPhoton
void OnFailedToConnectToPhoton(DisconnectCause cause)
{
StartCoroutine (ReconnectServer ());
}
示例3: OnConnectionFail
/// <summary>
/// Called when something causes the connection to fail (after it was established), followed by a call to OnDisconnectedFromPhoton().
/// </summary>
/// <remarks>
/// If the server could not be reached in the first place, OnFailedToConnectToPhoton is called instead.
/// The reason for the error is provided as DisconnectCause.
/// </remarks>
public virtual void OnConnectionFail(DisconnectCause cause)
{
}
示例4:
void IPunCallbacks.OnConnectionFail(DisconnectCause cause){}
示例5: OnConnectionFail
void OnConnectionFail( DisconnectCause cause )
{
if( isHost == true )
{
return;
}
Debug.LogWarning( "OnConnectionFail: " + cause );
}
示例6: OnConnectionFail
public override void OnConnectionFail(DisconnectCause cause)
{
Debug.Log("Disconnected due to: " + cause + ". this.previousRoom: " + this.previousRoom);
}
示例7: OnConnectionFail
public override void OnConnectionFail(DisconnectCause cause)
{
base.OnConnectionFail (cause);
logger.Log (cause);
onLeftLobbyEvent.Invoke ();
}
示例8: OnFailedToConnectToPhoton
public void OnFailedToConnectToPhoton(DisconnectCause cause){
Publish (this);
}
示例9: OnConnectionFail
public void OnConnectionFail(DisconnectCause cause){
Publish (this);
}
示例10: OnFailedToConnectToPhoton
/// <summary>
/// Called if a connect call to the Photon server failed before the connection was established, followed by a call
/// to OnDisconnectedFromPhoton().
/// </summary>
/// <remarks>This is called when no connection could be established at all.
/// It differs from OnConnectionFail, which is called when an existing connection fails.</remarks>
/// <param name="cause">Cause of disconnect.</param>
public override void OnFailedToConnectToPhoton(DisconnectCause cause)
{
_QuitGame();
}
示例11: OnFailedToConnectToPhoton
void OnFailedToConnectToPhoton( DisconnectCause cause )
{
// some error occurred, 'cause' is an enumeration of the error that happened
}
示例12: OnFailedToConnectToPhoton
/// <summary>
/// Callback used when connection to Photon servers fail.
/// </summary>
/// <param name="cause">The connection fail cause.</param>
public virtual void OnFailedToConnectToPhoton(DisconnectCause cause)
{
Debug.LogError("Failed to connect to Photon Server. Cause: " + cause);
connectionErrorFeedback.SetActive(true);
}
示例13: OnDissconnected
internal void OnDissconnected(IServerConnection connection, DisconnectCause cause)
{
DisconnectionEventArgs eventArgs = new DisconnectionEventArgs(connection.ID, cause);
this.RemoveConnection(connection);
if (this.Dissconnected != null)
this.Dissconnected(this, eventArgs);
}
示例14: OnFailedToConnectToPhoton
void OnFailedToConnectToPhoton( DisconnectCause cause )
{
// some error occurred, store it to be displayed
error = cause.ToString();
}
示例15: OnDissconnected
private void OnDissconnected(DisconnectCause cause)
{
this.Stop();
//Closes the dissconnected connection.
this.connection.Close();
//Invokes Dissconnected.
if (this.Dissconnected != null)
this.Dissconnected(this, cause);
}