public void OnHold(InputAction.CallbackContext context)
 {
     if (context.phase == InputActionPhase.Performed)
     {
         HoldEvent.Invoke();
     }
 }
Beispiel #2
0
 public void Update()
 {
     if (_HoldDuring > 0)
     {
         _HoldDuring -= Time.deltaTime;
         if (_HoldDuring <= 0)
         {
             _BtnHold.Invoke();
             _Holding = true;
         }
     }
 }
Beispiel #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;
 }
 private void DoubleTap() => HoldEvent?.Invoke(GetTouchPosition(0));