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

            this.SendCommand(command, this.NetManager.FirstPeer);
        }
Exemplo n.º 4
0
 protected abstract void OnCommandReceived(NetCommand command, NetPeer peer);