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>(); }
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; }