고다경

트레이너, 트레이니 운동 횟수 카운트

......@@ -2127,6 +2127,8 @@ MonoBehaviour:
HipBalance: {fileID: 64300837}
PullHipBack: {fileID: 469119556}
Great: {fileID: 1784424919}
Trainner_count: {fileID: 433964839}
Trainee_count: {fileID: 22123171}
count3: {fileID: 1983785836}
count2: {fileID: 132265372}
count1: {fileID: 1606945878}
......
......@@ -59,6 +59,9 @@ public class Move : MonoBehaviour
public Text PullHipBack;
public Text Great;
public Text Trainner_count, Trainee_count;
string trainercnt, traineecnt;
string hipbal, leftkneewarning, rightkneewarning, leftsidehighkick, rightsidehighkick;
string spinestraight, pullhipback, great;
......@@ -80,6 +83,8 @@ public class Move : MonoBehaviour
public GameObject Squat_Instruction, SideHighKick_Instruction, Lunge_Left_Instruction, Lunge_Right_Instruction;
public GameObject Right_Start;
int total;
//lsy
void Trainer_Run()
{
......@@ -101,16 +106,22 @@ public class Move : MonoBehaviour
{
trainer_count++;
Debug.Log("카운트 : " + trainer_count);
trainercnt = trainer_count + "/20";
Trainner_count.text = trainercnt;
}
if (trainer_count < 10 && exercise == "SideHiKick")
{
trainer_count++;
Debug.Log("카운트 : " + trainer_count);
trainercnt = trainer_count + "/10";
Trainner_count.text = trainercnt;
}
if (trainer_count < 10 && exercise == "Lunge")
{
trainer_count++;
Debug.Log("카운트 : " + trainer_count);
trainercnt = trainer_count + "/10";
Trainner_count.text = trainercnt;
}
if (trainer_count >= 20 && exercise == "Squat")
{
......@@ -213,26 +224,33 @@ public class Move : MonoBehaviour
workout_flag = 0;
workout_flag2 = 0;
total = 20;
}
else if (exercise == "SideHiKick")
{
workout_flag = 0;
total = 10;
}
else if (exercise == "Lunge")
{
workout_flag = 0;
total = 10;
}
workout_count++;
workout = false;
Debug.Log("트레이니: " + workout_count);
trainercnt = workout_count + "/" + total;
Trainee_count.text = trainercnt;
}
void Start()
{
timer = 0;
Trainner_count.text = "";
Trainee_count.text = "";
total = 20;
skeleton_Trainnner = new CharacterSkeleton(Trainnner);
skeleton_Trainnne = new CharacterSkeleton(Trainnne);
......