您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
36 行
944 B
36 行
944 B
using System.Collections.Generic;
|
|
|
|
namespace Unity.Netcode
|
|
{
|
|
/// <summary>
|
|
/// A NetworkClient
|
|
/// </summary>
|
|
public class NetworkClient
|
|
{
|
|
/// <summary>
|
|
/// The ClientId of the NetworkClient
|
|
/// </summary>
|
|
public ulong ClientId;
|
|
|
|
/// <summary>
|
|
/// The PlayerObject of the Client
|
|
/// </summary>
|
|
public NetworkObject PlayerObject;
|
|
|
|
/// <summary>
|
|
/// The NetworkObject's owned by this Client
|
|
/// </summary>
|
|
public List<NetworkObject> OwnedObjects
|
|
{
|
|
get
|
|
{
|
|
if (PlayerObject != null && PlayerObject.NetworkManager != null && PlayerObject.NetworkManager.IsListening)
|
|
{
|
|
return PlayerObject.NetworkManager.SpawnManager.GetClientOwnedObjects(ClientId);
|
|
}
|
|
|
|
return new List<NetworkObject>();
|
|
}
|
|
}
|
|
}
|
|
}
|