public void HandleInput(MouseInputEvent inputEvent)
        {
            switch (inputEvent.Action)
            {
            case MouseInputAction.MousePrimaryDown:
                m_pan.PointerDown(inputEvent);
                m_touch.PointerDown(inputEvent);
                m_tap.PointerDown(inputEvent);
                break;

            case MouseInputAction.MousePrimaryUp:
                m_pan.PointerUp(inputEvent);
                m_touch.PointerUp(inputEvent);
                m_tap.PointerUp(inputEvent);
                break;

            case MouseInputAction.MouseMove:
                m_pan.PointerMove(inputEvent);
                m_rotate.PointerMove(inputEvent);
                m_tilt.PointerMove(inputEvent);
                m_touch.PointerMove(inputEvent);
                break;

            case MouseInputAction.MouseSecondaryDown:
                m_rotate.PointerDown(inputEvent);
                break;

            case MouseInputAction.MouseSecondaryUp:
                m_rotate.PointerUp(inputEvent);
                break;

            case MouseInputAction.MouseMiddleDown:
                m_tilt.PointerDown(inputEvent);
                break;

            case MouseInputAction.MouseMiddleUp:
                m_tilt.PointerUp(inputEvent);
                break;

            case MouseInputAction.MouseWheel:
                m_zoom.PointerMove(inputEvent);
                break;
            }
        }
示例#2
0
        public void HandleInput(MouseInputEvent inputEvent)
        {
            switch (inputEvent.Action)
            {
            case MouseInputAction.MousePrimaryDown:
                if (EventSystem.current.IsPointerOverGameObject())
                {
                    break;
                }
                m_pan.PointerDown(inputEvent);
                m_touch.PointerDown(inputEvent);
                m_tap.PointerDown(inputEvent);
                break;

            case MouseInputAction.MousePrimaryUp:
                if (EventSystem.current.IsPointerOverGameObject())
                {
                    break;
                }
                m_pan.PointerUp(inputEvent);
                m_touch.PointerUp(inputEvent);
                m_tap.PointerUp(inputEvent);
                break;

            case MouseInputAction.MouseMove:
                if (EventSystem.current.IsPointerOverGameObject())
                {
                    break;
                }
                m_pan.PointerMove(inputEvent);
                m_rotate.PointerMove(inputEvent);
                m_tilt.PointerMove(inputEvent);
                m_touch.PointerMove(inputEvent);
                break;

            case MouseInputAction.MouseSecondaryDown:
                if (EventSystem.current.IsPointerOverGameObject())
                {
                    break;
                }
                m_rotate.PointerDown(inputEvent);
                break;

            case MouseInputAction.MouseSecondaryUp:
                if (EventSystem.current.IsPointerOverGameObject())
                {
                    break;
                }
                m_rotate.PointerUp(inputEvent);
                break;

            case MouseInputAction.MouseMiddleDown:
                if (EventSystem.current.IsPointerOverGameObject())
                {
                    break;
                }
                m_tilt.PointerDown(inputEvent);
                break;

            case MouseInputAction.MouseMiddleUp:
                if (EventSystem.current.IsPointerOverGameObject())
                {
                    break;
                }
                m_tilt.PointerUp(inputEvent);
                break;

            case MouseInputAction.MouseWheel:
                if (EventSystem.current.IsPointerOverGameObject())
                {
                    break;
                }
                m_zoom.PointerMove(inputEvent);
                break;
            }
        }