quantum-space-buddies/QSB/PlayerSyncObject.cs

13 lines
409 B
C#
Raw Normal View History

2020-09-04 19:10:01 +00:00
using UnityEngine.Networking;
namespace QSB
{
public abstract class PlayerSyncObject : NetworkBehaviour
{
2020-09-04 19:36:25 +00:00
public uint AttachedNetId => GetComponent<NetworkIdentity>()?.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);
}
}