Showing
1 changed file
with
19 additions
and
3 deletions
| ... | @@ -33,6 +33,7 @@ public class Move : MonoBehaviour | ... | @@ -33,6 +33,7 @@ public class Move : MonoBehaviour |
| 33 | 33 | ||
| 34 | //lsy | 34 | //lsy |
| 35 | public string[] lines; | 35 | public string[] lines; |
| 36 | + public string[] lines_right; | ||
| 36 | public int trainer_i = -1; | 37 | public int trainer_i = -1; |
| 37 | public int trainer_j = 0; | 38 | public int trainer_j = 0; |
| 38 | public float[] trainer_data1; | 39 | public float[] trainer_data1; |
| ... | @@ -131,13 +132,29 @@ public class Move : MonoBehaviour | ... | @@ -131,13 +132,29 @@ public class Move : MonoBehaviour |
| 131 | //lsy | 132 | //lsy |
| 132 | trainer_state = new int[bodyCount * jointCount]; | 133 | trainer_state = new int[bodyCount * jointCount]; |
| 133 | trainer_data1 = new float[bodyCount * jointCount * 3]; | 134 | trainer_data1 = new float[bodyCount * jointCount * 3]; |
| 134 | - lines = File.ReadAllLines(@"Trainer_txt/runzi_left.txt"); | ||
| 135 | - Debug.Log("읽음"); | ||
| 136 | //lsy end | 135 | //lsy end |
| 137 | 136 | ||
| 138 | exercise = ClickExercise.selected_exercise; //ClickExercise에서 선택한 운동이 무엇인지 String으로 넘어옴. | 137 | exercise = ClickExercise.selected_exercise; //ClickExercise에서 선택한 운동이 무엇인지 String으로 넘어옴. |
| 139 | Debug.Log(exercise); //Squat, SideHiKick, Lunge 에 따라서 Trainer움직이고, 사용자에게 instruction주기 | 138 | Debug.Log(exercise); //Squat, SideHiKick, Lunge 에 따라서 Trainer움직이고, 사용자에게 instruction주기 |
| 140 | 139 | ||
| 140 | + if (exercise == "Squat") | ||
| 141 | + { | ||
| 142 | + lines = File.ReadAllLines(@"Trainer_txt/squart.txt"); | ||
| 143 | + Debug.Log("읽음"); | ||
| 144 | + } | ||
| 145 | + else if (exercise == "SideHiKick") | ||
| 146 | + { | ||
| 147 | + lines = File.ReadAllLines(@"Trainer_txt/leg_left.txt"); | ||
| 148 | + lines_right = File.ReadAllLines(@"Trainer_txt/leg_right.txt"); | ||
| 149 | + Debug.Log("읽음"); | ||
| 150 | + } | ||
| 151 | + else | ||
| 152 | + { | ||
| 153 | + lines = File.ReadAllLines(@"Trainer_txt/runzi_left.txt"); | ||
| 154 | + lines_right = File.ReadAllLines(@"Trainer_txt/runzi_right.txt"); | ||
| 155 | + Debug.Log("읽음"); | ||
| 156 | + } | ||
| 157 | + | ||
| 141 | squat_count = 0; | 158 | squat_count = 0; |
| 142 | squat_flag = 0; | 159 | squat_flag = 0; |
| 143 | 160 | ||
| ... | @@ -234,7 +251,6 @@ public class Move : MonoBehaviour | ... | @@ -234,7 +251,6 @@ public class Move : MonoBehaviour |
| 234 | Trainer_Run(); | 251 | Trainer_Run(); |
| 235 | //lsy end | 252 | //lsy end |
| 236 | 253 | ||
| 237 | - | ||
| 238 | IfSpineIsStraight.text = "허리를 곧게: Tracking"; | 254 | IfSpineIsStraight.text = "허리를 곧게: Tracking"; |
| 239 | HipBalance.text = "양쪽 힙 균형: Calculating"; | 255 | HipBalance.text = "양쪽 힙 균형: Calculating"; |
| 240 | AngleLeftKnee.text = ""; | 256 | AngleLeftKnee.text = ""; | ... | ... |
-
Please register or login to post a comment