고다경

운동 횟수 카운트 재수정

...@@ -125,6 +125,19 @@ public class Move : MonoBehaviour ...@@ -125,6 +125,19 @@ public class Move : MonoBehaviour
125 125
126 void Trainee_Count() { 126 void Trainee_Count() {
127 127
128 + if (exercise == "Squat") {
129 +
130 + workout_flag = 0;
131 + workout_flag2 = 0;
132 + }
133 + else if (exercise == "SideHiKick") {
134 + workout_flag = 0;
135 +
136 + }
137 + else if (exercise == "Lunge") {
138 + workout_flag = 0;
139 + }
140 +
128 workout_count++; 141 workout_count++;
129 workout = false; 142 workout = false;
130 143
...@@ -425,7 +438,8 @@ public class Move : MonoBehaviour ...@@ -425,7 +438,8 @@ public class Move : MonoBehaviour
425 } 438 }
426 439
427 ////////////운동 횟수 카운트////////////////////// 440 ////////////운동 횟수 카운트//////////////////////
428 - if (ReadAngles[3] < 95 && ReadAngles[4] < 95 && workout && workout_flag >= 95) 441 + if (ReadAngles[3] < 95 && ReadAngles[4] < 95 && workout
442 + && workout_flag >= 95 && workout_flag2 >= 95)
429 { 443 {
430 Trainee_Count(); 444 Trainee_Count();
431 } 445 }
......