Exemplo n.º 1
0
    private void Update()
    {
        if (controlsText != null)
        {
            controlsText.text = header + "\n\n" + toggleableObject.toggleKey + " - Toggle view\n";
        }

        /*
         * switch (handController.GetLeapRecorder().state)
         * {
         *  case RecorderState.Recording:
         *      allowEndRecording();
         *      break;
         *  case RecorderState.Playing:
         *      allowPausePlayback();
         *      allowStopPlayback();
         *      break;
         *  case RecorderState.Paused:
         *      allowBeginPlayback();
         *      allowStopPlayback();
         *      break;
         *  case RecorderState.Stopped:
         *      allowBeginRecording();
         *      allowBeginPlayback();
         *      break;
         * }*/


        if (Input.GetKeyDown(toggleableObject.toggleKey) && !recordingFileInputField.isFocused)
        {
            lastActiveViewState = !lastActiveViewState;
            toggleableObject.toggleObject(lastActiveViewState);
        }

        if (recordingFileInputField.isFocused)
        {
            recordingFileInputFieldPlaceHolderText.text = "";
        }
        else
        {
            recordingFileInputFieldPlaceHolderText.text = "Enter Recording Name...";
        }

        /*
         * if (handController.GetLeapRecorder().state == RecorderState.Playing &&
         *  handController.GetRecordingProgress() == 1.0f)
         * {
         *  lastActiveViewState = true;
         *  toggleableObject.toggleObject(lastActiveViewState);
         *  handController.StopRecording();
         *  backgroundMaterial.SetFloat("_ColorSpaceGamma", 1.99f);
         * }*/
    }
Exemplo n.º 2
0
    private void Update()
    {
        if (isGatheringFrames && recordingTimer > 0)
        {
            gatherGestureFrames();
        }

        if (!GestureInputInteractable && !isGatheringFrames && Input.GetKeyDown(takeSnapShotKey))
        {
            isGatheringFrames = true;

            lastActiveViewState = false;
            toggleableObject.toggleObject(lastActiveViewState);
        }

        if (!gestureInputField.isFocused && Input.GetKeyDown(toggleableObject.toggleKey))
        {
            lastActiveViewState = !lastActiveViewState;
            toggleableObject.toggleObject(lastActiveViewState);
        }

        if (Input.GetKeyDown(resetSnapshotKey) && !gestureInputField.isFocused &&
            !errorModalDialog.isDialogActive() && gestureFrames.Count != 0)
        {
            resetModalDialog.showQuestionDialog(YesResetGestureEvent, NoResetGestureEvent);
        }

        if (gestureInputField.isFocused)
        {
            gestureInputFieldPlaceHolderText.text = "";
        }
        else
        {
            gestureInputFieldPlaceHolderText.text = "Enter Gesture Name...";
        }
    }