// Update is called once per frame void Update() { if (playing) { // controller.gameObject.SetActive(true); if (!previousPlaying) { // controller.gameObject.SetActive(true); Debug.Log("Loaded FrameCount: " + player.GetFramesCount()); player.Play(); player.loop = true; } // teacherImage.gameObject.SetActive (false); // teacherImage.sprite = gesture.teacherFrames [Mathf.FloorToInt (Time.time) % 2]; } else { // teacherImage.gameObject.SetActive (false); // controller.gameObject.SetActive(false); } previousPlaying = playing; }
void UpdateRecorder() { recorder_.speed = recorderSpeed; recorder_.loop = recorderLoop; if (recorder_.state == RecorderState.Recording || recorder_.state == RecorderState.RecordingFrame) { if (recorder_.state == RecorderState.RecordingFrame && recorder_.GetFramesCount() > 1) { recorder_.Stop(); Debug.Log("Wrote frame to: " + FinishAndSave()); } else { recorder_.AddFrame(leap_controller_.Frame()); } } else { recorder_.NextFrame(); } }