protected override void OnDisable()
        {
            if (m_CurrentInputModule != null)
            {
                m_CurrentInputModule.DeactivateModule();
                m_CurrentInputModule = null;
            }

            if (current == this)
            {
                current = null;
            }
            base.OnDisable();
        }
        protected override void OnEnable()
        {
            base.OnEnable();
            if (current == null)
            {
                current = this;
            }
#if UNITY_EDITOR
            else
            {
                Debug.LogWarning("Multiple EventSystems in scene... this is not supported");
            }
#endif
        }
Esempio n. 3
0
        public PointerEventData(BrandoEventSystem eventSystem) : base(eventSystem)
        {
            eligibleForClick = false;

            pointerId     = -1;
            position      = Vector2.zero; // Current position of the mouse or touch event
            delta         = Vector2.zero; // Delta since last update
            pressPosition = Vector2.zero; // Delta since the event started being tracked
            clickTime     = 0.0f;         // The last time a click event was sent out (used for double-clicks)
            clickCount    = 0;            // Number of clicks in a row. 2 for a double-click for example.

            scrollDelta      = Vector2.zero;
            useDragThreshold = true;
            dragging         = false;
            button           = InputButton.Left;
        }
Esempio n. 4
0
 public AxisEventData(BrandoEventSystem eventSystem)
     : base(eventSystem)
 {
     moveVector = Vector2.zero;
     moveDir    = MoveDirection.None;
 }
 public BaseEventData(BrandoEventSystem eventSystem)
 {
     m_EventSystem = eventSystem;
 }
 protected override void OnEnable()
 {
     base.OnEnable();
     m_EventSystem = GetComponent <BrandoEventSystem>();
     m_EventSystem.UpdateModules();
 }