public void Start() { t = false; current_time_movement = 0; var go = gameObject; if (GlobalController.patientOrPhysio) { GetMovementPoints.LoadLineRenderer(ref go, ref lineRenderer, c1, c2); GetMovementPoints.SavePoints(GlobalController.choiceAvatar, "/Movimentos/", GlobalController.instance.movement.pontosMovimento, mao, cotovelo, ombro, braco, true); } else { GetMovementPoints.LoadLineRenderer(ref go, ref lineRenderer, c1, c3); GetMovementPoints.SavePoints(GlobalController.choiceAvatar, "/Exercicios/", GlobalController.instance.exercise.pontosExercicio, mao, cotovelo, ombro, braco, true); } Assign(); }
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 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; } } }
/** * Descrever aqui o que esse método realiza. */ void Awake() { if (GlobalController.instance != null && (GlobalController.instance.movement != null || GlobalController.instance.exercise != null) ) { t = false; var go = gameObject; current_time_movement = 0; if (GlobalController.patientOrPhysio) { GetMovementPoints.LoadLineRenderer(ref go, ref lineRenderer, c1, c2); GetMovementPoints.SavePoints(GlobalController.choiceAvatar, "/Movimentos/", GlobalController.instance.movement.pontosMovimento, mao, cotovelo, ombro, braco, true); } else { GetMovementPoints.LoadLineRenderer(ref go, ref lineRenderer, c1, c3); GetMovementPoints.SavePoints(GlobalController.choiceAvatar, "/Exercicios/", GlobalController.instance.exercise.pontosExercicio, mao, cotovelo, ombro, braco, true); } } else { Debug.Log("Você violou o acesso!"); } }
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; } } }