示例#1
0
        Func <int, bool> m_perPointerShouldConsumeInputDelegate; // this takes precedence over m_shouldConsumeInputDelegate

        public CameraInputHandler()
        {
            var inputHandler = new UnityInputHandler(NativePluginRunner.API);

            if (UnityEngine.Input.touchSupported && UnityEngine.Input.multiTouchEnabled)
            {
                m_isTouchSupported    = true;
                m_touchInputProcessor = new UnityTouchInputProcessor(inputHandler, Screen.width, Screen.height);
            }
            if (UnityEngine.Input.mousePresent)
            {
                m_isMouseSupported    = true;
                m_mouseInputProcessor = new UnityMouseInputProcessor(inputHandler, Screen.width, Screen.height);
            }

            m_inputFrame            = new InputFrame();
            m_previousMousePosition = Vector2.zero;
        }