mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-06 01:00:16 +00:00
14 lines
502 B
C#
14 lines
502 B
C#
using QuantumUNET;
|
|
|
|
namespace QSB.Player
|
|
{
|
|
public abstract class PlayerSyncObject : QSBNetworkBehaviour
|
|
{
|
|
public uint AttachedNetId => NetIdentity?.NetId.Value ?? uint.MaxValue;
|
|
public uint PlayerId => NetIdentity.RootIdentity?.NetId.Value ?? NetIdentity.NetId.Value;
|
|
public PlayerInfo Player => QSBPlayerManager.GetPlayer(PlayerId);
|
|
|
|
protected virtual void Start() => QSBPlayerManager.AddSyncObject(this);
|
|
protected virtual void OnDestroy() => QSBPlayerManager.AddSyncObject(this);
|
|
}
|
|
} |