Пример #1
0
        public void OnMouseDelta(InputAction.CallbackContext context)
        {
            NJK.Log($"OnMouseDelta {context.phase}");

            mouseManager.UpdateDirect();    // <><><>

            if (faceMapPanel.isDragging || movesPanel.isDragging || controlsPanel.isDragging || mouseManager.isMovesPanelHit)
            {
                return;
            }

            if (EventSystem.current.IsPointerOverGameObject()) // <><><>
            {
                return;
            }

            Vector2 move = context.ReadValue <Vector2>();

            if (Mouse.current.leftButton.isPressed)
            {
                mainCamera.OrientCamera(move);
            }

            if (Mouse.current.rightButton.isPressed)
            {
                mainCamera.MoveViewport(move.x * 5.0f);
            }
        }
Пример #2
0
        public void OnEscape(InputAction.CallbackContext context)
        {
            NJK.Log($"OnEscape {context.phase}");

            Application.Quit();
            //EditorApplication.isPlaying = false;
        }
Пример #3
0
        //public void Update()
        //{
        //    UpdateDirect();
        //}

        public void UpdateDirect()
        {
            NJK.Log("MouseManager Update Direct");

            ResetFlags();
            CastRayFromMouse(Mouse.current.position.ReadValue());
            SetCursorFromFlags();
        }
Пример #4
0
        public void OnMouseClick(InputAction.CallbackContext context)
        {
            NJK.Log($"OnMouseClick {context.phase}");

            if (context.phase != InputActionPhase.Started)
            {
                return;
            }
            mouseManager.UpdateDirect();    // <><><>
            NJK.Log("OnClick");
        }
Пример #5
0
        public void OnReassemble1(InputAction.CallbackContext context)
        {
            if (context.phase != InputActionPhase.Started)
            {
                return;
            }

            animationController.StopAnimation();

            movesPanel.ClearMoves();

            myCube.ReassembleCube1();
            faceMapPanel.ResetMap();

            NJK.Log("Reassemble1");
        }