コード例 #1
0
        public MouseModel(int pointerId)
        {
            this.pointerId   = pointerId;
            changedThisFrame = false;
            m_Position       = deltaPosition = m_ScrollPosition = scrollDelta = Vector2.zero;

            m_LeftButton   = new MouseButtonModel();
            m_RightButton  = new MouseButtonModel();
            m_MiddleButton = new MouseButtonModel();
            m_LeftButton.Reset();
            m_RightButton.Reset();
            m_MiddleButton.Reset();

            m_InternalData = new InternalData();
            m_InternalData.Reset();
            m_InternalData.pointerTarget = null;
            m_InternalData.hoverTargets  = new InlinedArray <GameObject>();
        }
コード例 #2
0
ファイル: MouseModel.cs プロジェクト: qipa/InputSystem
        public MouseModel(EventSystem eventSystem, int pointerId)
        {
            this.pointerId   = pointerId;
            changedThisFrame = false;
            m_Position       = deltaPosition = m_ScrollPosition = scrollDelta = Vector2.zero;

            m_LeftButton   = new MouseButtonModel();
            m_RightButton  = new MouseButtonModel();
            m_MiddleButton = new MouseButtonModel();
            m_LeftButton.Reset();
            m_RightButton.Reset();
            m_MiddleButton.Reset();

            InternalData bookkeeping = new InternalData();

            bookkeeping.pointerTarget = null;
            bookkeeping.hoverTargets  = new InlinedArray <GameObject>();
            internalData = bookkeeping;
        }