quantum-space-buddies/QSB/Player/PlayerSyncObject.cs
Mister_Nebula 3249ce33af cleanup...
2020-11-03 21:33:48 +00:00

13 lines
416 B
C#

using UnityEngine.Networking;
namespace QSB.Player
{
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);
}
}