コード例 #1
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...";
        }
    }