예제 #1
0
파일: Client.cs 프로젝트: 0000duck/MiniRTS
 protected override void OnCommandReceived(NetCommand command, NetPeer peer)
 {
     this.Logger.Info($"client: received command {command.CommandId}:{command.Payload} from {command.Where} at {peer.EndPoint}");
 }
예제 #2
0
 protected void SendCommand(NetCommand command, NetPeer peer, DeliveryMethod deliveryMethod = DeliveryMethod.ReliableOrdered)
 => peer.Send(this.processor.Write(command), deliveryMethod);
예제 #3
0
파일: Client.cs 프로젝트: 0000duck/MiniRTS
        public void PingServer()
        {
            var command = NetCommand.Create(Vector3.Up, 1, "Ping!");

            this.SendCommand(command, this.NetManager.FirstPeer);
        }
예제 #4
0
 protected abstract void OnCommandReceived(NetCommand command, NetPeer peer);