김다솜

선택한 운동으로 file 읽기

......@@ -33,6 +33,7 @@ public class Move : MonoBehaviour
//lsy
public string[] lines;
public string[] lines_right;
public int trainer_i = -1;
public int trainer_j = 0;
public float[] trainer_data1;
......@@ -131,13 +132,29 @@ public class Move : MonoBehaviour
//lsy
trainer_state = new int[bodyCount * jointCount];
trainer_data1 = new float[bodyCount * jointCount * 3];
lines = File.ReadAllLines(@"Trainer_txt/runzi_left.txt");
Debug.Log("읽음");
//lsy end
exercise = ClickExercise.selected_exercise; //ClickExercise에서 선택한 운동이 무엇인지 String으로 넘어옴.
Debug.Log(exercise); //Squat, SideHiKick, Lunge 에 따라서 Trainer움직이고, 사용자에게 instruction주기
if (exercise == "Squat")
{
lines = File.ReadAllLines(@"Trainer_txt/squart.txt");
Debug.Log("읽음");
}
else if (exercise == "SideHiKick")
{
lines = File.ReadAllLines(@"Trainer_txt/leg_left.txt");
lines_right = File.ReadAllLines(@"Trainer_txt/leg_right.txt");
Debug.Log("읽음");
}
else
{
lines = File.ReadAllLines(@"Trainer_txt/runzi_left.txt");
lines_right = File.ReadAllLines(@"Trainer_txt/runzi_right.txt");
Debug.Log("읽음");
}
squat_count = 0;
squat_flag = 0;
......@@ -234,7 +251,6 @@ public class Move : MonoBehaviour
Trainer_Run();
//lsy end
IfSpineIsStraight.text = "허리를 곧게: Tracking";
HipBalance.text = "양쪽 힙 균형: Calculating";
AngleLeftKnee.text = "";
......