quantum-space-buddies/QSB/Player/PlayerSyncObject.cs
2020-12-04 22:14:53 +00:00

12 lines
377 B
C#

using QuantumUNET;
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);
}
}