quantum-space-buddies/QSB/PlayerSyncObject.cs
Mister_Nebula 8b1ce3b32c fixes
2020-09-04 20:36:25 +01:00

13 lines
407 B
C#

using UnityEngine.Networking;
namespace QSB
{
public abstract class PlayerSyncObject : NetworkBehaviour
{
public uint AttachedNetId => GetComponent<NetworkIdentity>()?.netId.Value ?? uint.MaxValue;
public uint PlayerId => this.GetPlayerOfObject();
public uint PreviousPlayerId { get; set; }
public PlayerInfo Player => PlayerRegistry.GetPlayer(PlayerId);
}
}