protected override void OnCommandReceived(NetCommand command, NetPeer peer) { this.Logger.Info($"client: received command {command.CommandId}:{command.Payload} from {command.Where} at {peer.EndPoint}"); }
protected void SendCommand(NetCommand command, NetPeer peer, DeliveryMethod deliveryMethod = DeliveryMethod.ReliableOrdered) => peer.Send(this.processor.Write(command), deliveryMethod);
public void PingServer() { var command = NetCommand.Create(Vector3.Up, 1, "Ping!"); this.SendCommand(command, this.NetManager.FirstPeer); }
protected abstract void OnCommandReceived(NetCommand command, NetPeer peer);