HostData.playerLimit 玩家限制

var playerLimit : int

Description描述

Maximum players limit

最多玩家限制。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	void Start() {
		HostData[] hostData = MasterServer.PollHostList();
		foreach (HostData element in hostData) {
			Debug.Log(element.gameName + " max spots: " + element.playerLimit);
		}
	}
}
// Requests info from the master server and prints
// the gameType of each host
//从master服务器请求信息,并打印每个主机的游戏名和玩家限制

function Start() {
	var hostData : HostData[] = MasterServer.PollHostList();
	for(var element : HostData in hostData) {
		Debug.Log(element.gameName + " max spots: " + element.playerLimit);
	}
}
Page last updated: 2011-2-24