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