quakeball/Assets/Scripts/Networking/NetPlayer.cs

35 lines
879 B
C#

using UnityEngine;
using NeonTea.Quakeball.Players;
namespace NeonTea.Quakeball.Networking {
public class NetPlayer {
private Player _Controlled;
private ulong _Id;
public ulong Id {
get { return _Id; }
set {
_Id = value;
if (_Controlled != null) {
_Controlled.NetId = _Id;
}
}
}
public Player Controlled {
get { return _Controlled; }
set {
_Controlled = value;
if (_Controlled != null) {
_Controlled.NetId = _Id;
}
}
}
public bool Unsynced = false;
public float Ping = 0;
public NetPlayer(ulong id, Player obj = null) {
Id = id;
Controlled = obj;
}
}
}