public void FixedUpdate() { if (t) { current_time_movement += Time.fixedDeltaTime; if (GlobalController.patientOrPhysio) { GetMovementPoints.SavePoints(current_time_movement, "/Movimentos/", GlobalController.instance.movement.pontosMovimento, mao, cotovelo, ombro, braco); } else { GetMovementPoints.SavePoints(current_time_movement, "/Exercicios/", GlobalController.instance.exercise.pontosExercicio, mao, cotovelo, ombro, braco); } if (current_time_movement >= 15f) { t = false; } GetMovementPoints.graphSpawner(transform, pointPrefab, mao, cotovelo, ombro, current_time_movement, ref lineRenderer); } }
public IEnumerator drawGraphic() { for (int j = 0; j < current_time.Count; ++j) { GetMovementPoints.graphSpawner(transform, pointPrefab, mao, cotovelo, ombro, current_time[j], ref lineRenderer); yield return(new WaitForSeconds(0.025f)); } }
public void FixedUpdate() { if (t) { client.BeginReceive(new AsyncCallback(ReceiveServerInfo), null); current_time_movement += Time.fixedDeltaTime; ombro.localPosition = f_ombro_pos; ombro.localEulerAngles = f_ombro_rot; braco.localPosition = f_braco_pos; braco.localEulerAngles = f_braco_rot; cotovelo.localPosition = f_cotovelo_pos; cotovelo.localEulerAngles = f_cotovelo_rot; mao.localPosition = f_mao_pos; mao.localEulerAngles = f_mao_rot; if (GlobalController.patientOrPhysio) { GetMovementPoints.SavePoints(current_time_movement, "/Movimentos/", GlobalController.instance.movement.pontosMovimento, mao, cotovelo, ombro, braco); } else { GetMovementPoints.SavePoints(current_time_movement, "/Exercicios/", GlobalController.instance.exercise.pontosExercicio, mao, cotovelo, ombro, braco); } GetMovementPoints.graphSpawner(transform, pointPrefab, mao, cotovelo, ombro, current_time_movement, ref lineRenderer); if (current_time_movement > 15) { t = false; } } }
public void FixedUpdate() { if (!udpSocketManager.isInitializationCompleted()) { Debug.Log("Initialization Completed"); return; } if (!isListenPortLogged) { IPHostEntry hostInfo = Dns.GetHostByName(Dns.GetHostName()); Console.WriteLine("Host name : " + hostInfo.HostName); Console.WriteLine("IP address List : "); for (int index = 0; index < hostInfo.AddressList.Length; index++) { if (hostInfo.AddressList[index].AddressFamily == AddressFamily.InterNetwork) { currentIPV4 = string.Format("{0}", hostInfo.AddressList[index]); } } Debug.Log("UdpSocketManager, listen port: " + udpSocketManager.getListenPort()); connectionInformation.text = string.Format("{1}:{0}", udpSocketManager.getListenPort(), currentIPV4); isListenPortLogged = true; GlobalController.showQrCode = true; } if (receivedAnyMessage) { connectionInformation.text = ""; } foreach (byte[] recPacket in udpSocketManager.receive()) { receivedAnyMessage = true; string receivedMsg = Encoding.UTF8.GetString(recPacket); LoadData(receivedMsg); //Debug.Log(receivedMsg); } if (t) { current_time_movement += Time.fixedDeltaTime; ombro.localPosition = f_ombro_pos; ombro.localEulerAngles = f_ombro_rot; braco.localPosition = f_braco_pos; braco.localEulerAngles = f_braco_rot; cotovelo.localPosition = f_cotovelo_pos; cotovelo.localEulerAngles = f_cotovelo_rot; mao.localPosition = f_mao_pos; mao.localEulerAngles = f_mao_rot; if (GlobalController.patientOrPhysio) { GetMovementPoints.SavePoints(current_time_movement, "/Movimentos/", GlobalController.instance.movement.pontosMovimento, mao, cotovelo, ombro, braco, false); } else { GetMovementPoints.SavePoints(current_time_movement, "/Exercicios/", GlobalController.instance.exercise.pontosExercicio, mao, cotovelo, ombro, braco, false); } GetMovementPoints.graphSpawner(transform, pointPrefab, mao, cotovelo, ombro, current_time_movement, ref lineRenderer); if (current_time_movement > 15) { t = false; } } }