mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-06 01:00:16 +00:00
14 lines
413 B
C#
14 lines
413 B
C#
using System;
|
|
using UnityEngine.Networking;
|
|
|
|
namespace QSB
|
|
{
|
|
public abstract class PlayerSyncObject : NetworkBehaviour
|
|
{
|
|
public uint NetId => GetComponent<NetworkIdentity>()?.netId.Value ?? uint.MaxValue;
|
|
public uint PlayerId => this.GetPlayerOfObject();
|
|
public uint PreviousPlayerId { get; set; }
|
|
public PlayerInfo Player => PlayerRegistry.GetPlayer(PlayerId);
|
|
}
|
|
}
|