private void Update()
 {
     if (isPointDown)
     {
         onPress.Invoke();
     }
 }
Beispiel #2
0
 public void OnPointerDown(PointerEventData eventData)
 {
     if (imageSwap != null)
     {
         image.sprite = imageSwap;
     }
     OnPressEvent?.Invoke();
     OnChangeEvent?.Invoke(true);
 }
Beispiel #3
0
    private void OnPress(InputAction.CallbackContext callbackContext)
    {
        if (IsInputNotValidState())
        {
            return;
        }

        isPress = true;
        OnPressEvent?.Invoke(touchPosition.ReadValue <Vector2>());

#if DEBUGGING
        Debug.Log("Press");
#endif
    }
Beispiel #4
0
 public void OnMouseDown()
 {
     OnPress.Invoke();
 }