public bool ScreenSize(int width, int height)
 {
     qr.endQRShow();
     pressedJump    = false;
     m_Acceleration = 1f;
     widthScreen    = width;
     heightScreen   = height;
     selectController.MobileConected();
     return(true);
 }
示例#2
0
        // send thread
        private void SendData()
        {
            System.Net.Sockets.UdpClient cliente = new System.Net.Sockets.UdpClient();



            while (!conectado)
            {
                ;
            }
            cliente.Connect(anyIP.Address, puerto);
            qr.endQRShow();//end the QR
            byte[] timeToVibrate = new byte[4];
            timeToVibrate[0] = (byte)(vibrationTime & 0x000000FF);
            timeToVibrate[1] = (byte)((vibrationTime >> 4) & 0x000000FF);
            timeToVibrate[2] = (byte)((vibrationTime >> 8) & 0x000000FF);
            timeToVibrate[3] = (byte)((vibrationTime >> 16) & 0x000000FF);
            cliente.Send(timeToVibrate, timeToVibrate.Length);


            while (sending)
            {
                if (vibrate)
                {
                    byte[] vibrateMessage = new byte[4];
                    vibrateMessage[0] = 0;
                    vibrateMessage[1] = 0;
                    vibrate           = false;
                    cliente.Send(vibrateMessage, vibrateMessage.Length);
                }
                if (send)
                {
                    send = false;
                    cliente.Send(byteImg, byteImg.Length); //este mensaje tiene de latencia 5ms aprox cuando hace ping
                }
            }
            byte[] sendData = new byte[1];
            //fin de comunicación
            sendData[0] = 1;
            cliente.Send(sendData, sendData.Length);
            Debug.Log("terminó");
        }
示例#3
0
 public void endQRShow()
 {
     qr.endQRShow();
 }