void Update() { leftHandType = leftHand.GetGesure(); rightHandType = rightHand.GetGesure(); leftHand.UpdateTarget(); rightHand.UpdateTarget(); }
//public IEnumerator Pause() //{ // print(Time.time); // if (Time.time >= pauseTime) // { // state = AnimaState.Pause; // anim.speed = 0; // yield break; // } // else // { // yield return new WaitForSeconds(3f); // if (Time.time >= pauseTime) // { // state = AnimaState.Pause; // anim.speed = 0; // yield break; // } // } //} public void CheckState(GameObject go, string handName) { if (handName == "LeftHand") { nowHand = leftHand; } else if (handName == "RightHand") { nowHand = rightHand; } if (nowHand.GetGesure() == HandType.Catch) { if (go == targetArray[index]) { GoOn(); print("Go on 0.3s"); } //else //{ // StartCoroutine(Pause()); //} } //else //{ // StartCoroutine(Pause()); //} }