using System;
using Unity.Entities;
namespace Unity.NetCode.Samples.PlayerList
{
///
/// Similar to , except a , allowing the client to store this data in a buffer.
/// Stores all players and their state (username, ping etc).
/// Index mapped to NetworkId - 1.
///
///
/// This is therefore automatically sorted and deterministic.
/// Will contain disconnected players whose NetworkId has not been re-used.
/// Will also contain default entries as the list is resized with some spare capacity.
/// Depends on the implicit rules of NetworkId's.
/// A list is used to allow implicit resizing without having to dispose.
///
public struct PlayerListBufferEntry : IBufferElementData
{
/// Stores the last received RPC for this player.
public PlayerListEntry.ChangedRpc State;
public bool IsCreated => State.NetworkId != default;
}
}