// 이코드를 갖고있는 object들한테만 적용되는 코드. void Start() { //kinect.getKinect(); ret = Blur.CalculateNormalized1DSampleKernel(1);//0.054 0.244 0.4026 num_frame = 0; frame = 0; count = 0; doing_action = true; mirror = false; skeleton = new CharacterSkeleton(gameObject); // total_file_cnt = Directory.GetFiles(Path.Combine(@"C:\Obj_Kinect_Opengl_Predefined_Movement_Frame_ShoulderOK\glut\", gameObject.transform.name.Split('_')[0]), "*.txt").Length; //total_file_cnt = Directory.GetFiles(Path.Combine(@"C:\Users\User\Documents\New Unity Project\Assets\data\", gameObject.transform.name.Split('_')[0]), "*.txt").Length; }
private void NetworkingClient_EventReceived(EventData obj) { if (obj.Code == CHANGE) { object[] datas = (object[])obj.CustomData; float[] data = (float[])datas[0]; int[] state = (int[])datas[1]; bool mirror = (bool)datas[3]; bool move = (bool)datas[4]; if (condition == 1) { skeleton1 = new CharacterSkeleton(humanoid); skeleton1.set(data, state, 0, mirror, move); condition = 0; } else { skeleton1.set(data, state, 0, mirror, move); } } }
void Start() { kinect = getKinect(); skeleton = new CharacterSkeleton(humanoid); }
void Start() { timer = 0; Trainner_count.text = ""; Trainee_count.text = ""; total = "20"; tot = 20; skeleton_Trainnner = new CharacterSkeleton(Trainnner); skeleton_Trainnne = new CharacterSkeleton(Trainnne); //lsy trainer_state = new int[bodyCount * jointCount]; trainer_data1 = new float[bodyCount * jointCount * 3]; //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_right.txt"); lines_right = File.ReadAllLines(@"Trainer_txt/leg_left.txt"); //Debug.Log("읽음"); } else if (exercise == "Lunge") { lines = File.ReadAllLines(@"Trainer_txt/runzi_right.txt"); lines_right = File.ReadAllLines(@"Trainer_txt/runzi_left.txt"); // Debug.Log("읽음"); } else { lines = File.ReadAllLines(@"Trainer_txt/squart.txt"); //Debug.Log("읽음"); } workout_count = 0; workout_flag = 0; workout_flag2 = 0; workout = false; sidehk_flag = 0; lunge_flag_l = 0; lunge_flag_r = 0; flag = 0; flag_timer = 0; if (exercise == "Squat") { Squat_Instruction.SetActive(true); } else if (exercise == "SideHiKick") { SideHighKick_Instruction.SetActive(true); } else if (exercise == "Lunge") { Lunge_Left_Instruction.SetActive(true); } //HipBalance1.SetActive(false); //PullHipBack2.SetActive(false); //LegUp3.SetActive(false); //SpineStraight4.SetActive(false); //Great5.SetActive(false); //KneeDown6.SetActive(false); }
void Start() { skeleton = new CharacterSkeleton(humanoid); }