public void OnHold(InputAction.CallbackContext context)
 {
     if (context.phase == InputActionPhase.Performed)
     {
         HoldEvent.Invoke();
     }
 }
Example #2
0
 public void Update()
 {
     if (_HoldDuring > 0)
     {
         _HoldDuring -= Time.deltaTime;
         if (_HoldDuring <= 0)
         {
             _BtnHold.Invoke();
             _Holding = true;
         }
     }
 }
Example #3
0
 public override void OnPointerClick(PointerEventData eventData)
 {
     if (m_HoldTime < CLICK_TIME)
     {
         base.OnPointerClick(eventData);
     }
     else
     {
         if (onHold != null)
         {
             onHold.Invoke(m_HoldTime);
         }
     }
     m_HoldTime = 0.0f;
 }
Example #4
0
 private void DoubleTap() => HoldEvent?.Invoke(GetTouchPosition(0));