quantum-space-buddies/QSB/Player/PlayerSyncObject.cs
2020-12-03 08:28:05 +00:00

12 lines
381 B
C#

using QSB.QuantumUNET;
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);
}
}