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


C# DisconnectCause类代码示例

本文整理汇总了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);
    }
开发者ID:SaltPeter,项目名称:fps,代码行数:8,代码来源:bl_GameManager.cs

示例2: OnFailedToConnectToPhoton

 void OnFailedToConnectToPhoton(DisconnectCause cause)
 {
     StartCoroutine (ReconnectServer ());
 }
开发者ID:earth88,项目名称:feuille,代码行数:4,代码来源:PhotonInitServer.cs

示例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)
 {
 }
开发者ID:colruytXD,项目名称:Hide-N-Seek-Simulator,代码行数:10,代码来源:PhotonClasses.cs

示例4:

		void IPunCallbacks.OnConnectionFail(DisconnectCause cause){}
开发者ID:InvertGames,项目名称:uFrame.Photon,代码行数:1,代码来源:OnReceivedRoomListUpdateDispatcher.cs

示例5: OnConnectionFail

	void OnConnectionFail( DisconnectCause cause )
	{
		if( isHost == true )
		{
			return;
		}
		
		Debug.LogWarning( "OnConnectionFail: " + cause );
	}
开发者ID:MiloBuwalda,项目名称:wizard,代码行数:9,代码来源:NetworkController.cs

示例6: OnConnectionFail

 public override void OnConnectionFail(DisconnectCause cause)
 {
     Debug.Log("Disconnected due to: " + cause + ". this.previousRoom: " + this.previousRoom);
 }
开发者ID:NukeTheMoon,项目名称:OrbitalControl,代码行数:4,代码来源:RpsDemoConnect.cs

示例7: OnConnectionFail

 public override void OnConnectionFail(DisconnectCause cause)
 {
     base.OnConnectionFail (cause);
     logger.Log (cause);
     onLeftLobbyEvent.Invoke ();
 }
开发者ID:2ty,项目名称:race3d,代码行数:6,代码来源:MatchingCtrl.cs

示例8: OnFailedToConnectToPhoton

		public void OnFailedToConnectToPhoton(DisconnectCause cause){
			Publish (this);
		}
开发者ID:InvertGames,项目名称:uFrame.Photon,代码行数:3,代码来源:OnFailedToConnectToPhotonDispatcher.cs

示例9: OnConnectionFail

		public void OnConnectionFail(DisconnectCause cause){
			Publish (this);
		}
开发者ID:InvertGames,项目名称:uFrame.Photon,代码行数:3,代码来源:OnConnectionFailDispatcher.cs

示例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();
 }
开发者ID:kyr7,项目名称:tango-examples-unity,代码行数:11,代码来源:MultiplayerCubeStackerUIController.cs

示例11: OnFailedToConnectToPhoton

 void OnFailedToConnectToPhoton( DisconnectCause cause )
 {
     // some error occurred, 'cause' is an enumeration of the error that happened
 }
开发者ID:thomaskofiannan,项目名称:HiveClone,代码行数:4,代码来源:ConnectToPhoton.cs

示例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);
    }
开发者ID:dearzhangle,项目名称:UNION-OpenSource-MOBA,代码行数:10,代码来源:MultiplayerRoomsManager.cs

示例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);
        }
开发者ID:gustavAR,项目名称:Spang,代码行数:9,代码来源:Server.cs

示例14: OnFailedToConnectToPhoton

 void OnFailedToConnectToPhoton( DisconnectCause cause )
 {
     // some error occurred, store it to be displayed
     error = cause.ToString();
 }
开发者ID:rafacp,项目名称:UnityMultiplayer,代码行数:5,代码来源:Example_ConnectToPhoton.cs

示例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);
 }
开发者ID:gustavAR,项目名称:Spang,代码行数:9,代码来源:Client.cs


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