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


C# MasterServerEvent类代码示例

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


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


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