public void OnPointerUp(PointerEventData eventData) { //#if UNITY_EDITOR // Debug.Log("Up"); //#endif // if (GameManagerNew.Instance.gameModeConfig != GameModeConfig.GAME_OFFLINE) // { //#if UNITY_EDITOR // Debug.Log("Game Multi - Check game Run"); //#endif // if (!GameManagerNew.Instance.CheckGameRun()) // { //#if UNITY_EDITOR // Debug.Log("Game Multi - Game not running"); //#endif // return; // } // } float swipeDistHorizontal = (new Vector3(eventData.position.x, 0, 0) - new Vector3(startPos.x, 0, 0)).magnitude; if (swipeDistHorizontal > minSwipeDistX) { float swipeValue = Mathf.Sign(eventData.position.x - startPos.x); if (swipeValue > 0) { right(); } else if (swipeValue < 0) { left(); } } else { Debug.Log("down"); boat.Hook(); } }