quantum-space-buddies/QSB/Player/PlayerSyncObject.cs
2020-12-02 09:51:53 +00:00

13 lines
422 B
C#

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