• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# MasterServerEvent类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中MasterServerEvent的典型用法代码示例。如果您正苦于以下问题:C# MasterServerEvent类的具体用法?C# MasterServerEvent怎么用?C# MasterServerEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



MasterServerEvent类属于命名空间,在下文中一共展示了MasterServerEvent类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: OnMasterServerEvent

 void OnMasterServerEvent(MasterServerEvent msEvent)
 {
     if (msEvent == MasterServerEvent.HostListReceived)
     {
         //hostList = MasterServer.PollHostList();
     }
 }
开发者ID:pmlamotte,项目名称:2Pac,代码行数:7,代码来源:NetworkManager.cs


示例2: OnMasterServerEvent

 public override void OnMasterServerEvent(MasterServerEvent masterServerEvent)
 {
     base.OnMasterServerEvent(masterServerEvent);
     if (masterServerEvent == MasterServerEvent.HostListReceived) {
         hostListReceived();
     }
 }
开发者ID:alvarogzp,项目名称:nextation,代码行数:7,代码来源:ClientNetworkEntity.cs


示例3: OnMasterServerEvent

 void OnMasterServerEvent(MasterServerEvent msEvent)
 {
     Debug.Log("Entr a change OnMasterServerEvent");
     if (msEvent == MasterServerEvent.HostListReceived) {
         hostList = MasterServer.PollHostList ();
     }
 }
开发者ID:alexis0592,项目名称:AngryHunterMobile,代码行数:7,代码来源:NetworkManager.cs


示例4: OnMasterServerEvent

 void OnMasterServerEvent(MasterServerEvent mse)
 {
     if(mse == MasterServerEvent.RegistrationSucceeded)
     {
     Debug.Log("Registered Server!");
     }
 }
开发者ID:nthacker12,项目名称:BoidsAssignment,代码行数:7,代码来源:Networking.cs


示例5: OnMasterServerEvent

 void OnMasterServerEvent(MasterServerEvent mse)
 {
     if (mse == MasterServerEvent.RegistrationSucceeded)
     {
         print("registered server");
     }
 }
开发者ID:edwonia,项目名称:Not-Alone,代码行数:7,代码来源:NetworkManagerScript.cs


示例6: OnMasterServerEvent

    void OnMasterServerEvent(MasterServerEvent msEvent)
    {
        bool trying_client = false;

        if (msEvent == MasterServerEvent.HostListReceived)
        {
            Debug.Log("Master Server List Received");
            hostList.Clear();
            hostList.AddRange(MasterServer.PollHostList());

            foreach (HostData hd in hostList)
            {
                if (hd.connectedPlayers < hd.playerLimit)
                {
                    Debug.Log("Connecting to Server...");
                    Network.Connect(hd);
                    trying_client = true;
                }
            }

            if (Network.peerType == NetworkPeerType.Disconnected && !trying_client)
            {
                Debug.Log("Initializing Server");
                Network.InitializeServer(numberOfPlayers, connectionPort, !Network.HavePublicAddress());
                MasterServer.RegisterHost(typeName, gameName);
            }
        }
    }
开发者ID:rat-race,项目名称:soakertournament,代码行数:28,代码来源:NetworkMenuScript.cs


示例7: OnMasterServerEvent

	void OnMasterServerEvent(MasterServerEvent e)
	{
		if (e == MasterServerEvent.RegistrationSucceeded)
			Debug.Log("RegistrationSucceeded");
		else if (e == MasterServerEvent.HostListReceived)
			hostDatas = MasterServer.PollHostList();
	}
开发者ID:jquentin,项目名称:LaserPin,代码行数:7,代码来源:LaserPinNetworkManager.cs


示例8: ServerCreationEvent

		public ServerCreationEvent(MasterServerEvent mse)
		{
			if(mse == MasterServerEvent.RegistrationSucceeded)
				this.eventCode = ServerCreationEventCode.RegistrationSucceeded;
			else if(mse == MasterServerEvent.RegistrationFailedGameName || mse == MasterServerEvent.RegistrationFailedGameType || mse == MasterServerEvent.RegistrationFailedNoServer)
				this.eventCode = ServerCreationEventCode.MSRegistrationFailed;
		}
开发者ID:SuperStarPL,项目名称:Radius,代码行数:7,代码来源:NetworkManager.cs


示例9: OnMasterServerEvent

 void OnMasterServerEvent(MasterServerEvent e)
 {
     if (e == MasterServerEvent.HostListReceived)
     {
         hosts = MasterServer.PollHostList();
     }
 }
开发者ID:esapp3,项目名称:NitscheSays,代码行数:7,代码来源:NetworkManager.cs


示例10: OnMasterServerEvent

 void OnMasterServerEvent(MasterServerEvent msEvent)
 {
     if (msEvent == MasterServerEvent.HostListReceived) {
         hostList = MasterServer.PollHostList ();
     }
     else if (msEvent == MasterServerEvent.RegistrationSucceeded)
         Debug.Log ("server registered");
 }
开发者ID:RothschildGames,项目名称:o11,代码行数:8,代码来源:NetworkManager.cs


示例11: OnMasterServerEvent

	// Appelée quand un événement serveur a lieux.
	void OnMasterServerEvent(MasterServerEvent sEvent)
	{
		if (sEvent == MasterServerEvent.HostListReceived)
		{
			Debug.Log ("Liste des parties mise à jour");
			_hostData = MasterServer.PollHostList();
		}
	}
开发者ID:JordanDx,项目名称:demonixis.tutorials,代码行数:9,代码来源:NetworkManager.cs


示例12: OnMasterServerEvent

 public void OnMasterServerEvent(MasterServerEvent msEvent)
 {
     if (msEvent == MasterServerEvent.HostListReceived)
     {
         ServerHostList = MasterServer.PollHostList();
         if (ServerHostList.Length > 0)
             UpdateServerList();
     }
 }
开发者ID:sidedcore,项目名称:DodgeThisScripts,代码行数:9,代码来源:ServerList.cs


示例13: OnMasterServerEvent

 void OnMasterServerEvent(MasterServerEvent msEvent)
 {
   if (msEvent == MasterServerEvent.HostListReceived)
   {
     Debug.Log("Host list received");
     hostList = MasterServer.PollHostList();
     Debug.Log(hostList.Length);
   }
 }
开发者ID:vs-team,项目名称:casanova-mk2,代码行数:9,代码来源:NetworkManager.cs


示例14: OnMasterServerEvent

    void OnMasterServerEvent(MasterServerEvent msEvent)
    {
        if(msEvent == MasterServerEvent.RegistrationSucceeded)
            Debug.Log("Server Registered");

        if(msEvent == MasterServerEvent.HostListReceived)
            Debug.Log("Hosts Refreshed");
            hostsUpdated = true;
    }
开发者ID:poemdexter,项目名称:Rogue-BB,代码行数:9,代码来源:NetworkTitleUI.cs


示例15: OnMasterServerEvent

	void OnMasterServerEvent(MasterServerEvent msEvent)
	{
		if(msEvent == MasterServerEvent.RegistrationFailedGameName)
			GameManager.WriteMessage("Server Registration Failed: No game name given");
		if(msEvent == MasterServerEvent.RegistrationFailedGameType)
			GameManager.WriteMessage("Server Registration Failed: No game tpye given");
		if(msEvent == MasterServerEvent.RegistrationFailedNoServer)
			GameManager.WriteMessage("Server Registration Failed: Server not running");
		if(msEvent == MasterServerEvent.RegistrationSucceeded)
			GameManager.WriteMessage("Server Registraion Suceeded");
	}
开发者ID:Blurift,项目名称:Instincts,代码行数:11,代码来源:NetworkManager.cs


示例16: OnMasterServerEvent

 void OnMasterServerEvent(MasterServerEvent msEvent)
 {
     if (msEvent == MasterServerEvent.HostListReceived)
     {
         Debug.Log("Successfully recieved host list.");
         _hostList = MasterServer.PollHostList();
     }
     else if (msEvent == MasterServerEvent.RegistrationSucceeded)
     {
         Debug.Log("Successfully registered server on master server.");
     }
 }
开发者ID:nbilling,项目名称:TNPRH,代码行数:12,代码来源:NetworkManager.cs


示例17: OnMasterServerEvent

    private void OnMasterServerEvent(MasterServerEvent masterServerEvent)
    {
        switch(masterServerEvent)
        {
        case MasterServerEvent.HostListReceived:
            availableServers = MasterServer.PollHostList();
            break;

        default:
            break;
        }
    }
开发者ID:kitun,项目名称:Stoned,代码行数:12,代码来源:NetworkManager.cs


示例18: OnMasterServerEvent

    // Called when master server shit happens
    void OnMasterServerEvent(MasterServerEvent mse)
    {
        // When registration happens
        if (mse == MasterServerEvent.RegistrationSucceeded) {
            Debug.Log("Server registered on Master server!");
        }

        // When server list is recieved, store it
        if (mse == MasterServerEvent.HostListReceived) {
            hosts = MasterServer.PollHostList();
            refreshing = false;
        }
    }
开发者ID:nicolaikruger,项目名称:GGJ-14,代码行数:14,代码来源:NetworkManagerScript.cs


示例19: OnMasterServerEvent

	void OnMasterServerEvent(MasterServerEvent msEvent){

		if (msEvent == MasterServerEvent.HostListReceived) {
				Debug.Log ("Found Server!!");
				hostList = MasterServer.PollHostList ();
				//statusText.text = "Found Server!!  " + hostList.Length;
				ListServer ();
			} else {
				Debug.Log ("Server Not Found !!");
				//statusText.text = "Server Not Found !!";
		}

	}
开发者ID:tattoxcm,项目名称:VRBike,代码行数:13,代码来源:MultiplayerController.cs


示例20: OnMasterServerEvent

    void OnMasterServerEvent(MasterServerEvent masterServerEvent)
    {
        Debug.Log ("master server event message received: " + masterServerEvent);

        if (masterServerEvent == MasterServerEvent.RegistrationSucceeded) {
            Debug.Log ("Registered server");
        }

        if (masterServerEvent == MasterServerEvent.HostListReceived) {
        //			yield return new WaitForSeconds(1.5f);
            hostList = MasterServer.PollHostList();
            //hostList = Invoke("MasterServer.PollHostList", 2f);
        }
    }
开发者ID:allansequeira,项目名称:UnityNetworkingIntro,代码行数:14,代码来源:NetworkManager.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Mat类代码示例发布时间:2022-05-24
下一篇:
C# MasterList类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap