Example #1
0
    public void OnPointerUp(PointerEventData eventData)
    {
        if (_isOnPlayingField)
        {
            BoardService.ConnectPiecesWithinSnappingDistanceTo(this);
        }

        foreach (var piece in connectedPieces)
        {
            piece.ScaleToNormalSize();
        }

        if (IsFreeStanding && _isOnPlayingField)
        {
            _lastTapUpTime = Time.realtimeSinceStartup;
            if (_startedDoubleTap)
            {
                if (_lastTapUpTime - _lastTapDownTime <= DOUBLE_TAP_BREAK_INTERVAL)
                {
                    MoveBackToPool();
                }
            }
        }
    }