quantum-space-buddies/QSB/PlayerSyncObject.cs
Mister_Nebula 5e9e1a7241 cleanup
2020-11-03 21:18:40 +00:00

13 lines
409 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 => QSBPlayerManager.GetPlayer(PlayerId);
}
}