2020-09-04 19:10:01 +00:00
|
|
|
|
using UnityEngine.Networking;
|
2020-08-21 20:31:42 +00:00
|
|
|
|
|
2020-11-03 21:33:48 +00:00
|
|
|
|
namespace QSB.Player
|
2020-08-21 20:31:42 +00:00
|
|
|
|
{
|
2020-12-02 09:51:53 +00:00
|
|
|
|
public abstract class PlayerSyncObject : QSBNetworkBehaviour
|
2020-08-21 20:31:42 +00:00
|
|
|
|
{
|
2020-12-02 09:51:53 +00:00
|
|
|
|
public uint AttachedNetId => GetComponent<QSBNetworkIdentity>()?.NetId.Value ?? uint.MaxValue;
|
2020-09-04 19:09:25 +00:00
|
|
|
|
public uint PlayerId => this.GetPlayerOfObject();
|
|
|
|
|
public uint PreviousPlayerId { get; set; }
|
2020-11-03 21:18:40 +00:00
|
|
|
|
public PlayerInfo Player => QSBPlayerManager.GetPlayer(PlayerId);
|
2020-08-21 20:31:42 +00:00
|
|
|
|
}
|
|
|
|
|
}
|