2020-09-04 20:10:01 +01:00
|
|
|
|
using UnityEngine.Networking;
|
2020-08-21 22:31:42 +02:00
|
|
|
|
|
2020-11-03 21:33:48 +00:00
|
|
|
|
namespace QSB.Player
|
2020-08-21 22:31:42 +02:00
|
|
|
|
{
|
|
|
|
|
public abstract class PlayerSyncObject : NetworkBehaviour
|
|
|
|
|
{
|
2020-09-04 20:36:25 +01:00
|
|
|
|
public uint AttachedNetId => GetComponent<NetworkIdentity>()?.netId.Value ?? uint.MaxValue;
|
2020-09-04 20:09:25 +01: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 22:31:42 +02:00
|
|
|
|
}
|
|
|
|
|
}
|