quantum-space-buddies/QSB/Player/PlayerSyncObject.cs
2020-12-07 21:19:16 +00:00

13 lines
407 B
C#

using QuantumUNET;
using QuantumUNET.Components;
namespace QSB.Player
{
public abstract class PlayerSyncObject : QSBNetworkBehaviour
{
public uint AttachedNetId => GetComponent<QSBNetworkIdentity>()?.NetId.Value ?? uint.MaxValue;
public uint PlayerId => this.GetPlayerOfObject();
public uint PreviousPlayerId { get; set; }
public PlayerInfo Player => QSBPlayerManager.GetPlayer(PlayerId);
}
}