Ejemplo n.º 1
0
 // Start is called before the first frame update
 void Start()
 {
     localTrans.AddRange(gameObject.GetComponentsInChildren <Transform>());
     handMover = gameObject.GetComponent <HandMover>();
     Debug.Log(PlayerPrefs.GetInt("ChoosedGesture"));
     savedData = new LoadData().getTransformByIndex(PlayerPrefs.GetInt("ChoosedGesture"), handMover.getChirality());
     poses     = savedData._handPosition;
     rots      = savedData._handRotation;
     Debug.Log(poses.Count + " poses.Count");
     checkZones = GetComponentsInChildren <CheckZone>();
     Debug.Log(checkZones.Length);
     handMover.SetNewTransforms(poses, rots);
 }
 public void LoadChoosedGesture()
 {
     if (listGesture._allFileName[0] != "No items!")
     {
         handMoverLeft.StopPlay();
         handMoverRight.StopPlay();
         savedData = loadData.getTransformByIndex(dropdown.value, handMoverLeft.getChirality());
         handMoverLeft.SetNewTransforms(savedData._handPosition, savedData._handRotation);
         savedData = loadData.getTransformByIndex(dropdown.value, handMoverRight.getChirality());
         handMoverRight.SetNewTransforms(savedData._handPosition, savedData._handRotation);
         handMoverLeft.StartPlay();
         handMoverRight.StartPlay();
         PlayerPrefs.SetInt("ChoosedGesture", dropdown.value);
         PlayerPrefs.Save();
         SceneManager.LoadScene("ComplitingMovement");
     }
 }
Ejemplo n.º 3
0
    private IEnumerator PausePlaying()
    {
        recording = false;
        leftGetTrans.StopRecording();
        rightGetTrans.StopRecording();
        leftHandMov.SetNewTransforms(leftGetTrans.GetRecPos(), leftGetTrans.GetRecRot());
        rightHandMov.SetNewTransforms(rightGetTrans.GetRecPos(), rightGetTrans.GetRecRot());
        fantomHandLeft.SetActive(true);
        fantomHandRight.SetActive(true);
        leftHandMov.StartPlay();
        rightHandMov.StartPlay();

        yield return(new WaitUntil(() =>
        {
            return !leftHandMov.FirstCircule() && !rightHandMov.FirstCircule();
        }));

        askNamePanel.SetActive(true);
        fantomHandLeft.SetActive(false);
        fantomHandRight.SetActive(false);
    }