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

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

#if DEBUGGING
        Debug.Log("Press");
#endif
    }
 private void Awake()
 {
     onPress = new OnPressEvent();
 }