quantum-space-buddies/QSB/Player/PlayerSyncObject.cs

13 lines
382 B
C#
Raw Normal View History

2020-12-02 21:21:43 +00:00
using QSB.QuantumUNET;
2020-11-03 21:33:48 +00:00
namespace QSB.Player
{
2020-12-02 21:29:53 +00:00
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);
}
}