private const float BufferTime = 0.1f; //100 milliseconds public RemotePlayer(ClientPlayerManager manager, string name, RemotePlayerLoginPacket remotePlayerPacket) : base(manager, name, remotePlayerPacket.InitialPlayerState.Id) { _position = remotePlayerPacket.InitialPlayerState.Position; _maxHealth = remotePlayerPacket.Health; _rotation = remotePlayerPacket.InitialPlayerState.Rotation; _buffer.Add(remotePlayerPacket.InitialPlayerState); }
private void OnRemotePlayerConnected(RemotePlayerLoginPacket packet) { Debug.Log($"Player connected: {packet.Username}"); OnRemoteConnection?.Invoke(packet); }