void Update()
 {
     if (grabAction.GetState(hand))
     {
         Debug.Log("Grab!");
     }
 }
Beispiel #2
0
    private void Update()
    {
        if (teleportAction.GetState(handType))
        {
            RaycastHit hit;
            // If teleportation ray hits layer
            if (Physics.Raycast(controllerPose.transform.position, transform.forward, out hit, 100, teleportMask))
            {
                hitPoint = hit.point;
                ShowLaser(hit);
                pointer.SetActive(true);
                teleportPointerTransform.position = hitPoint + teleportPointerOffset;
                shouldTeleport = true;
            }
            else
            {
                HideLaser();
            }
        }
        else
        {
            HideLaser();
        }

        if (teleportAction.GetStateUp(handType))
        {
            HideLaser();
            if (shouldTeleport)
            {
                Teleport();
            }
        }
    }
Beispiel #3
0
 private void CheckHandInput()
 {
     if (OpenVR.Input != null)
     {
         foreach (Hand hand in Player.instance.hands)
         {
             if (scaleUp.GetState(hand.handType))
             {
                 Vector3 upScale = this.transform.localScale + (Vector3.one / 10 * speed);
                 if (upScale.y <= MaxHeightLimit)
                 {
                     this.transform.localScale = upScale;
                 }
             }
             else if (scaleDown.GetState(hand.handType))
             {
                 Vector3 downScale = this.transform.localScale - (Vector3.one / 10 * speed);
                 if (downScale.y >= MinHeightLimit)
                 {
                     this.transform.localScale = downScale;
                 }
             }
         }
     }
 }
Beispiel #4
0
    // Update is called once per frame
    void Update()
    {
        // 1
        if (teleportAction.GetState(handType))
        {
            RaycastHit hit;

            // 2
            if (Physics.Raycast(controllerPose.transform.position, transform.forward, out hit, 100, teleportMask))
            {
                hitPoint = hit.point;
                ShowLaser(hit);
                // 1
                reticle.SetActive(true);
                // 2
                teleportReticleTransform.position = hitPoint + teleportReticleOffset;
                // 3
                shouldTeleport = true;
            }
        }
        else // 3
        {
            laser.SetActive(false);
            reticle.SetActive(false);
        }

        if (teleportAction.GetStateUp(handType) && shouldTeleport)
        {
            Teleport();
        }
    }
Beispiel #5
0
 void Update()
 {
     if (triggerAction.GetState(SteamVR_Input_Sources.LeftHand))
     {
         Absorbe();
     }
 }
Beispiel #6
0
    void Update()
    {
        if (trigger.GetStateDown(leftHand))
        // 한 번 클릭했을 때 trigger 값을 호출
        {
            Debug.Log("왼손 트리거 버튼");
            haptic.Execute(0.2f, 0.3f, 120.0f, 0.7f, leftHand);
        }

        if (trigger.GetStateUp(rightHand))
        {
            Debug.Log("오른손 트리거 버튼");
        }

        if (trackPadClick.GetStateDown(any))
        {
            Debug.Log("트랙패드 클릭");
        }

        if (trackPadTouch.GetState(any))
        {
            Vector2 pos = trackPadPosition.GetAxis(any);
            Debug.Log($"터치 포스 x = {pos.x}, y = {pos.y}");
        }
        //코드가 중복되어서 삭제함
    }
Beispiel #7
0
    private void Update()
    {
        //Debug.LogFormat("Lifting {0}, Grabbing {1}, LiftTarget {2}, GrabTarget{3}", lifting, grabbing, liftTarget, grabTarget);
        if (!outline)
        {
            RemakeParticles();//only calls once
        }

        if (!IsHolding())
        {
            Targeting();
        }

        if (pickupAction.GetStateUp(controller))//let go
        {
            LetGo();
            supressGrab = false;
        }
        else if (pickupAction.GetState(controller) && !supressGrab)//use telekinesis
        {
            Grab();
        }

        if (pickupAction.GetStateUp(controller))
        {
            grabbing   = false;
            grabTarget = null;
        }

        if (throwAction.GetStateDown(controller))//throw
        {
            if (liftTarget)
            {
                liftTarget.AddForce(head.forward * launchForce, ForceMode.VelocityChange);
                OneshotManager.instance.PlaySound("psi_throw", transform.position);

                supressGrab = true;
                LetGo();
            }
        }

        if (stopSound && soundLoop.time < 0.1f)
        {
            soundLoop.Stop();
            stopSound = false;
        }

        if (lifting && liftTarget)
        {
            liftTarget.position = Vector3.Lerp(liftTarget.position, tkPoint.position, Time.deltaTime);

            Debug.DrawLine(tkPoint.position, liftTarget.position);
        }

        if (lifting && !soundLoop.isPlaying)
        {
            soundLoop.Play();
        }
    }
Beispiel #8
0
    // Update is called once per frame
    void Update()
    {
        //pauses or resumes animation whenever the play/pause button on the left controller touchpad is pressed
        Vector2 touchpadCordLeft = touchpadPositionLeft.GetAxis(SteamVR_Input_Sources.Any);

        if (SteamVR_Input._default.inActions.PlayPause.GetStateUp(SteamVR_Input_Sources.Any) && Mathf.Abs(touchpadCordLeft.x) < 0.4f && Mathf.Abs(touchpadCordLeft.y) < 0.4f)
        {
            //UIActions.PlayNow();
            scriptContainer.GetComponent <UIActions>().PlayNow2();
        }

        /*
         * if (SteamVR_Input._default.inActions.PlayPause.GetStateUp(SteamVR_Input_Sources.Any) && Mathf.Abs(touchpadCordLeft.y) >0.6f)
         * {
         *  UIActions.speed
         * }
         */

        /*
         * if(Mathf.Abs(touchpadCordLeft.y) > 0.7f)
         * {
         *  if (scriptContainer.GetComponent<UIActions>().speedSlider.value <= scriptContainer.GetComponent<UIActions>().speedSlider.maxValue && scriptContainer.GetComponent<UIActions>().speedSlider.value >= scriptContainer.GetComponent<UIActions>().speedSlider.minValue)
         *  {
         *      scriptContainer.GetComponent<UIActions>().speed = scriptContainer.GetComponent<UIActions>().speedSlider.value + touchpadCordLeft.y;
         *
         *  }
         * }
         */

        Vector2 touchCordRight = touchpadPositionRight.GetAxis(SteamVR_Input_Sources.Any);

        //zoom in and slightly translates the environment
        if (Mathf.Abs(touchCordRight.x) < 0.7 && !rightTriggerBool)
        {
            scriptContainer.GetComponent <CreateNeurons>().dummyGameObject.transform.localScale += new Vector3(touchCordRight.y * 0.01f, touchCordRight.y * 0.01f, touchCordRight.y * 0.01f);
        }
        if (Mathf.Abs(touchCordRight.y) < 0.7 && !rightTriggerBool)
        {
            scriptContainer.GetComponent <CreateNeurons>().dummyGameObject.transform.localPosition += new Vector3(0, touchCordRight.x * 0.01f, 0);
        }

        //maps the right touchpad coordinates onto the environment coordinates by moving it around, while locking the vertical movement
        rightTriggerBool = triggerPress.GetState(SteamVR_Input_Sources.Any);
        if (rightTriggerBool)
        {
            rightCanvas.SetActive(false);
            rightCanvasTrigger.SetActive(true);
            //scriptContainer.GetComponent<CreateNeurons>().dummyGameObject.transform.localPosition += new Vector3(touchpadPosition.y * 0.01f, 0, -touchpadPosition.x * 0.01f);
            Vector3 yolo = -camera.transform.forward * -touchCordRight.y * 0.01f;
            yolo   += camera.transform.right * touchCordRight.x * 0.01f;
            yolo.y *= 0;
            scriptContainer.GetComponent <CreateNeurons>().dummyGameObject.transform.localPosition += yolo;
        }
        if (!rightTriggerBool)
        {
            rightCanvas.SetActive(true);
            rightCanvasTrigger.SetActive(false);
        }
    }
 // Update is called once per frame
 void Update()
 {
     if (GrabAction.GetState(HandType) && count_true_or_false)
     {
         _Counter.ViveTriggerOn();
         count_true_or_false = false;
     }
 }
 // Update is called once per frame
 void Update()
 {
     if (trigger.GetState(controller))
     {
         Debug.Log("Trigger ON");
         vibration.Execute(secStart, secEnd, frequency, strength, controller);
     }
 }
Beispiel #11
0
    // Update is called once per frame
    void Update()
    {
        isHeld = GetComponent <Throwable>().GetAttached();


        // Si on prend le smartphone, alors la roue de choix du code apparaît
        if (isHeld)
        {
            if (initWheelOK)
            {
                initiateButtonWheel();
                initWheelOK = false;
            }

            //Activation du canvas
            canvas.SetActive(true);

            // On récupère la position du pouce sur le trackpad de la main droite
            menuPosition = menuScroll.GetAxis(SteamVR_Input_Sources.RightHand);

            // On calcule l'angle
            angle = Mathf.Atan(menuPosition[0] / menuPosition[1]);

            //On change le bouton en fonction de l'angle
            SwitchButton(angle);

            //On ajoute un nombre avec le bouton de la main droite
            if (selectNumber.GetState(SteamVR_Input_Sources.LeftHand))
            {
                addNumber(idCurrentButton);
            }

            //Quand on relâche la gâchette on peut rajouter un chiffre
            if (!selectNumber.GetState(SteamVR_Input_Sources.LeftHand))
            {
                unChiffreEnPlusPasPlus = true;
            }
        }

        else
        {
            destroyButtonWheel();
            initWheelOK = true;
            canvas.SetActive(false);
        }
    }
Beispiel #12
0
 void Update()
 {
     Position                = pose.GetLocalPosition(inputSource);
     Stick.Value             = stick.GetAxis(inputSource);
     MainButtonPressed.Value = mainButton.GetState(inputSource);
     ModifierPressed.Value   = modifier.GetState(inputSource);
     CancellerPressed.Value  = canceller.GetState(inputSource);
 }
Beispiel #13
0
    private void UpdateInput()
    {
        //todo catch any exceptions from turning controller offf
        joystickInput = movementJoystick.GetAxis(movementHand);

        snapLeft  = snapLeftAction.GetState(turnHand) && !teleportAction.GetState(turnHand);
        snapRight = snapRightAction.GetState(turnHand) && !teleportAction.GetState(turnHand);
    }
 void Update()
 {
     if (trackPadTouch.GetState(leftHand))
     {
         Vector2 pos = trackPadPosition.GetAxis(leftHand);
         Debug.LogFormat("Touch position = {0}", pos);
     }
 }
Beispiel #15
0
        void Update()
        {
            if (!_vrmObject)
            {
                _vrmObject = GameObject.Find("VRM");
            }
            // 右手input
            _clickRight = _actionBoolean.GetState(_srcRight);
            _tpadRightX = _actionVector2.GetAxis(_srcRight).x;
            _tpadRightY = _actionVector2.GetAxis(_srcRight).y;

            // 左手input
            _clickLeft = _actionBoolean.GetState(_srcLeft);
            _tpadLeftX = _actionVector2.GetAxis(_srcLeft).x;
            _tpadLeftY = _actionVector2.GetAxis(_srcLeft).y;

            // 右のタッチパッドは移動を割り当て
            // VRMのforworadにすることで、向かっている正面をキーの前ボタンと対応させた。
            if (_clickRight && _tpadRightY > 0 && _tpadRightX < 0.7f && _tpadRightX > -0.7f)
            {
                transform.position += _vrmObject.transform.forward * Time.deltaTime * _moveSpeed;
            }
            if (_clickRight && _tpadRightY < 0 && _tpadRightX < 0.7f && _tpadRightX > -0.7f)
            {
                transform.position -= _vrmObject.transform.forward * Time.deltaTime * _moveSpeed;
            }
            if (_clickRight && _tpadRightX < 0 && _tpadRightY < 0.7f && _tpadRightY > -0.7f)
            {
                transform.position -= _vrmObject.transform.right * Time.deltaTime * _moveSpeed;
            }
            if (_clickRight && _tpadRightX > 0 && _tpadRightY < 0.7f && _tpadRightY > -0.7f)
            {
                transform.position += _vrmObject.transform.right * Time.deltaTime * _moveSpeed;
            }

            // 左のタッチパッドは回転を割り当て
            // RotateAroundにVRMを入れることで、VRM中心に回転するように設定
            if (_clickLeft && _tpadLeftX < 0 && _tpadLeftY < 0.5f && _tpadLeftY > -0.5f)
            {
                transform.RotateAround(_vrmObject.transform.position, transform.up, -Time.deltaTime * _rotateSpeed);
            }
            if (_clickLeft && _tpadLeftX > 0 && _tpadLeftY < 0.5f && _tpadLeftY > -0.5f)
            {
                transform.RotateAround(_vrmObject.transform.position, transform.up, Time.deltaTime * _rotateSpeed);
            }
        }
    private void Update()
    {
        if (moveAction.GetStateDown(SteamVR_Input_Sources.RightHand) == true && moveAction.GetStateDown(SteamVR_Input_Sources.LeftHand) != true)
        {
            BeginMovingObject();
        }

        if (moveAction.GetState(SteamVR_Input_Sources.RightHand) == true && moveAction.GetState(SteamVR_Input_Sources.LeftHand) != true)
        {
            transform.position += GetMovementDelta() * 2;
        }

        if (moveAction.GetStateUp(SteamVR_Input_Sources.RightHand) == true && moveAction.GetStateUp(SteamVR_Input_Sources.LeftHand) != true)
        {
            FinishMovingObject();
        }
    }
Beispiel #17
0
    void Update()
    {
        if (teleportAction.GetState(handType))
        {
            RaycastHit hit;

            if (Physics.Raycast(controllerPose.transform.position, transform.forward,
                                out hit, 100, teleportMask))
            {
                hitPoint = hit.point;
                ShowLaser(hit);
                reticle.SetActive(true);
                teleportReticleTransform.position = hitPoint + teleportReticleOffset;
                shouldTeleport = true;
            }
        }
        else
        {
            laser.SetActive(false);
            reticle.SetActive(false);
        }

        if (teleportAction.GetStateUp(handType) && shouldTeleport)
        {
            Teleport();
        }

        if (!Bt.is_Menu_On && teleportAction.GetState(handType))
        {
            down_elapsed += 1.0f * Time.deltaTime;
            if (down_elapsed >= 2.0f)
            {
                MenuCanvas.SetActive(true);
                Bt.is_Menu_On = true;
                down_elapsed  = 0.0f;
            }
        }
        else
        {
            down_elapsed = 0.0f;
        }
        if (!Bt.is_Menu_On)
        {
            MenuCanvas.SetActive(false);
        }
    }
Beispiel #18
0
 // Update is called once per frame
 void Update()
 {
     if (balloonAction.GetState(SteamVR_Input_Sources.Any) && Create == false)
     {
         if (ballon != null)
         {
             ballon.GetComponent <Expand>().enabled = false;
         }
         Vector3 location = this.transform.position;
         ballon = Instantiate(ballonPrefab, location, Quaternion.identity);
         Create = true;
     }
     if (balloonAction.GetState(SteamVR_Input_Sources.Any) == false)
     {
         Create = false;
     }
 }
Beispiel #19
0
 private void OnAxisValueChanged(SteamVR_Action_Boolean actionIn, SteamVR_Input_Sources hand, bool newState)
 {
     Value = SpawnMultiplier.Evaluate(actionIn.GetState(Hand) ? 1f : 0f);
     _psyiaEmitter.EmissionMultiplier = Value;
     _psyiaEmitter.SetEmission(Value > 0f);
     //_psyiaEmitter.Settings.MinSpawnVelocity = MinSpawnVelocity.Evaluate(Value);
     //_psyiaEmitter.Settings.MaxSpawnVelocity = MaxSpawnVelocity.Evaluate(Value);
 }
Beispiel #20
0
    private void Move(Vector3 moveDir, bool left)
    {
        float runMult = 1.0f;

        if (alwaysSprint || (!left && runAction.GetState(SteamVR_Input_Sources.RightHand) ||
                             left && runAction.GetState(SteamVR_Input_Sources.LeftHand)))
        {
            runMult = runMultiplier;
        }

        velocity = moveDir * moveSpeed * runMult;

        if (!collisionChecker.IsColliding(transform.position + velocity * Time.deltaTime, true))
        {
            transform.position += velocity * Time.deltaTime;
        }
    }
 void Update()
 {
     if (PickupAction.GetState(SteamVR_Input_Sources.Any))
     {
         Vector3    Pos = this.transform.position;
         Quaternion rot = this.transform.rotation;
     }
 }
Beispiel #22
0
    private void Update()
    {
        if (openMenuAction.GetState(menuHand))
        {
            if (!menuPressed)
            {
                menuPressed = true;
                menuObject.SetActive(!menuObject.activeSelf);

                if (menuObject.activeSelf && activeHand == laserPointerLeft && pointerActive)
                {
                    activeHand.ToggleLaser(false);
                    pointerActive = false;
                }
            }
        }
        else if (menuPressed)
        {
            menuPressed = false;
        }

        if (pointerActive && playerRB.velocity.magnitude > pointerMoveSpeedTreshold)
        {
            activeHand.ToggleLaser(false);
            pointerActive = false;
        }

        if (clickAction.GetState(SteamVR_Input_Sources.RightHand))
        {
            if (activeHand == laserPointerLeft)
            {
                activeHand.ToggleLaser(false);
                pointerActive = false;
                activeHand    = laserPointerRight;
            }

            if (!pointerActive)
            {
                activeHand.ToggleLaser(true);
                pointerActive = true;
            }
        }
        else if (clickAction.GetState(SteamVR_Input_Sources.LeftHand))
        {
            if (activeHand == laserPointerRight)
            {
                activeHand.ToggleLaser(false);
                pointerActive = false;
                activeHand    = laserPointerLeft;
            }

            if (!pointerActive && !menuObject.activeSelf)
            {
                activeHand.ToggleLaser(true);
                pointerActive = true;
            }
        }
    }
Beispiel #23
0
    /* VR input handling */
    private void Update()
    {
        /* toggle interaction menu */
        if (toggleMenu.GetStateDown(menuHand))
        {
            Debug.Log("toggling menu");
            menu.gameObject.SetActive(!menu.gameObject.activeInHierarchy);
        }

        /* toggle selection laser on/off */
        if (toggleLaser.GetStateDown(selectHand))
        {
            Debug.Log("toggling laser");
            interactingHand.ActivateSelectLaser();
        }
        /* select the hovered object */
        if (select.GetStateDown(selectHand))
        {
            Debug.Log("selecting");
            this.SelectObject();
        }
        /* teleport to the hovered object */
        if (teleport.GetStateDown(selectHand))
        {
            Debug.Log("teleporting");
            sceneManager.TeleportToSystemViepoint();
        }
        /* push a UI button, drag a slider, etc. */
        if (menuInteract.GetStateDown(selectHand))
        {
            Debug.Log("interacting");
            interactingHand.UseControl();
            //interactingHand.ControlCast();
        }
        if (menuInteract.GetStateUp(selectHand))
        {
            // stop using control (slider)
            interactingHand.StopUsingControl();
        }
        if (menuInteract.GetState(selectHand))
        {
            // shoot raycast to manipulate slider
            interactingHand.ControlCast();
        }

        // VR control debugging
        if (debugMode)
        {
            if (toggle2.GetStateDown(SteamVR_Input_Sources.Any))
            {
                Debug.Log("default: toggling laser");
            }
            if (select2.GetStateDown(SteamVR_Input_Sources.Any))
            {
                Debug.Log("defaulting: selecting");
            }
        }
    }
Beispiel #24
0
    private void MouseClick()
    {
        if (outlineScript.isOutlined)
        {
            if (buttonAction.GetState(handType01) || buttonAction.GetState(handType02) || Input.GetKeyDown(KeyCode.Space))
            {
                ResetTab();
                Debug.Log("Tab is reset");
            }
        }

        /*
         * else
         * {
         *  transform.parent.gameObject.GetComponent<CanBeDrag>().onResetButton = false;
         * }
         */
    }
Beispiel #25
0
    void Update()
    {
        //Gets the hand pose so buttons will work
        Pose = GetComponentInParent <SteamVR_Behaviour_Pose>();

        //Checks if the object is being held. If so, attaches to the hand and allowes the buttons to be used
        if (interactable.attachedToHand)
        {
            SteamVR_Input_Sources hand = interactable.attachedToHand.handType;

            //Changes variables and starts the particle system when you hold the trigger
            if (sprayButton.GetState(Pose.inputSource))
            {
                MaxDistance = 10;
                particleSpray.Play();
                particleSprayObject.SetActive(true);
                //Raycast collison detector that prints the collided objects name
                if (Physics.Raycast(transform.position, direction, out hit, MaxDistance))
                {
                    print(hit.transform.name);
                }
                var scale = particleSpray.shape;
                scale.scale = new Vector3(0.8f, 0.8f, 0.3f);
                var speed = particleSpray.main;
                speed.startSpeed = 30;
                var emission = particleSpray.emission;
                emission.rateOverTime         = 250f;
                particleScale                 = particleSpray.GetComponent <ParticleSystemRenderer>();
                particleScale.maxParticleSize = 0.1f;

                //Changes the Skeleton pose
                poser.SetBlendingBehaviourValue("blend", 0.5f);
            }
            //Changes variables and starts the particle system when you click the button when you touch the trigger
            else if (sprayButton2.GetState(Pose.inputSource))
            {
                MaxDistance = 1;
                particleSpray.Play();
                particleSprayObject.SetActive(true);
                if (Physics.Raycast(transform.position, direction, out hit, MaxDistance))
                {
                    print(hit.transform.name);
                }
                var scale = particleSpray.shape;
                scale.scale = new Vector3(0.06f, 0.06f, 0.04f);
                var speed = particleSpray.main;
                speed.startSpeed = 10;
                var emission = particleSpray.emission;
                emission.rateOverTime         = 125f;
                particleScale                 = particleSpray.GetComponent <ParticleSystemRenderer>();
                particleScale.maxParticleSize = 0.05f;

                //Changes the Skeleton pose
                poser.SetBlendingBehaviourValue("blend", 0.5f);
            }
        }
    }
Beispiel #26
0
        public bool IsButtonPressed(Hand hand, SteamVR_Action_Boolean booleanAction)
        {
            if (AssertHand(hand))
            {
                return(booleanAction.GetState(hand.handType));
            }

            return(false);
        }
Beispiel #27
0
        void OnTriggerStay(Collider col)
        {
            Debug.Log(velo.GetVelocity(SteamVR_Input_Sources.RightHand));
            GameObject grabObject = col.gameObject;

            print(colController.GetComponent <Rigidbody>().velocity);
            if (col.gameObject.CompareTag("Pickup") && grabAction.GetState(SteamVR_Input_Sources.Any))
            {
                grabObject.transform.SetParent(gameObject.transform);
                grabObject.GetComponent <Rigidbody> ().isKinematic = true;
            }
            else if (col.gameObject.CompareTag("Pickup") && grabAction.GetState(SteamVR_Input_Sources.Any) == false)
            {
                grabObject.transform.SetParent(GameObject.Find("Interactable").transform);
                grabObject.GetComponent <Rigidbody> ().isKinematic = false;
                grabObject.GetComponent <Rigidbody> ().velocity    = velo.GetVelocity(SteamVR_Input_Sources.RightHand);
            }
        }
Beispiel #28
0
 bool IsTeleportButtonDown(Hand hand)
 {
     if (IsEligibleForTeleport(hand))
     {
         return(teleportAction.GetState(hand.handType));
         //return hand.controller.GetPress( SteamVR_Controller.ButtonMask.Touchpad );
     }
     return(false);
 }
Beispiel #29
0
    public void TriggerDown(SteamVR_Action_Boolean fromAction, SteamVR_Input_Sources fromSource)
    {
        if (fromSource == SteamVR_Input_Sources.LeftHand)
        {
            if (Calibrate.GetState(rightHand))
            {
                calibrate();
            }
        }

        else if (fromSource == SteamVR_Input_Sources.RightHand)
        {
            if (Calibrate.GetState(leftHand))
            {
                calibrate();
            }
        }
    }
    IEnumerator UIButtonCheck()
    {
        while (true)
        {
            if (ClimbAction.GetState(inputSource))
            {
                velocity = hand.transform.InverseTransformDirection(hand.GetVelocity()).x;
                //print(velocity);
                //velocity = hand.GetVelocity().x;
                if (velocity >= 1f)
                {
                    if (!uiCanvas.gameObject.activeSelf)
                    {
                        uiCanvas.position = uiPosition.position;
                        uiCanvas.gameObject.SetActive(true);
                        uiState = UIState.item;
                        StartCoroutine(RaycastEvent());
                        yield return(null);
                    }
                    else
                    {
                        switch (uiState)
                        {
                        case UIState.item:
                            if (isSlide)
                            {
                                uiState = UIState.drone;
                            }
                            break;

                        case UIState.drone:
                            if (isSlide)
                            {
                                uiState = UIState.menu;
                            }
                            break;

                        case UIState.menu:
                            if (isSlide)
                            {
                                uiState = UIState.item;
                            }
                            break;
                        }
                    }
                    yield return(StartCoroutine(UIStateCheck()));
                }
                if (velocity <= -1f)
                {
                    uiState = UIState.off;

                    yield return(StartCoroutine(UIStateCheck()));
                }
            }
            yield return(new WaitForSeconds(0.1f));
        }
    }