quakeball/Assets/Scripts/Networking/NetPlayer.cs
2020-08-08 20:14:34 +03:00

37 lines
941 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 string Nick;
public bool Unsynced = false;
public float Ping = 0;
public NetPlayer(ulong id, Player obj = null) {
Id = id;
Controlled = obj;
Nick = id.ToString();
}
}
}