Beispiel #1
0
    void OnMouseDown()
    {
        if (_da != null && _da.CanDrag && HowToStart == StartDragBehavior.OnMouseDown)
        {
            StartDragging();
        }

        if (_dragging && HowToEnd == EndDragBehavior.OnMouseDown)
        {
            _dragging = false;
            HoverPreview.PreviewsAllowed = true;
            _draggingThis = null;
            _da.OnEndDrag();
        }
    }
Beispiel #2
0
    void OnMouseDown()
    {
        if (da != null && da.CanDrag && HowToStart == StartDragBehavior.OnMouseDown)
        {
            StartDragging();
        }

        if (dragging && HowToEnd == EndDragBehavior.OnMouseDown)
        {
            dragging = false;
            // turn all previews back on
            HoverPreview.PreviewsAllowed = true;
            _draggingThis = null;
            da.OnEndDrag();
        }
    }
 void OnMouseUp()
 {
     if (dragging)
     {
         dragging = false;
         //HoverPreview.PreviewsAllowed = true;   // NEW LINE
         da.OnEndDrag();
     }
 }
Beispiel #4
0
 void OnMouseUp()
 {
     if (dragging)
     {
         dragging = false;
         HoverPreview.PreviewsAllowed = true;
         _draggingThis = null;
         dragAction.OnEndDrag();
     }
 }
Beispiel #5
0
 void OnMouseUp()
 {
     if (dragging && card.isMine)
     {
         dragging = false;
         HoverPreview.PreviewsAllowed = true;
         _draggingThis = null;
         da.OnEndDrag();
         //dt.OnEndDrag();
     }
 }
Beispiel #6
0
 void OnMouseUp()
 {
     if (dragging)
     {
         dragging = false;
         // włącz ponownie wszystkie podglądy
         HoverPreview.PreviewsAllowed = true;
         _draggingThis = null;
         da.OnEndDrag();
     }
 }
 void OnMouseUp()
 {
     if (dragging)
     {
         dragging = false;
         // turn previews back on
         HoverOnCard.PreviewsAllowed = true;
         _draggingThis = null;
         da.OnEndDrag();
     }
 }
Beispiel #8
0
 private void OnMouseUp()
 {
     if (dragging)
     {
         dragging = false;
         // turn all previews back on
         HoverPreview.PreviewsAllowed = true;
         _draggingThis = null;
         da.OnEndDrag();
     }
 }
Beispiel #9
0
 void OnMouseUp()
 {
     if (dragging)
     {
         foreach (PlayerManager p in GameManager.Instance.players)
         {
             p.playerInput.InputEnabled = true;
         }
         dragging = false;
         // turn all previews back on
         HoverPreview.PreviewsAllowed = true;
         _draggingThis = null;
         da.OnEndDrag();
     }
 }
Beispiel #10
0
    void OnMouseUp()
    {
        if (dragging)
        {
            DebugManager.Instance.DebugMessage("Let go.", DebugManager.MessageType.PlayerInteraction);
            dragging     = false;
            DraggingThis = null;
            da.OnEndDrag();

            // turn all previews back on
            HoverPreview.PreviewsAllowed = true;
            // unhighlight all we did
            CardActionManager.Instance.UnHighlightAll();
            // rehighlight all we want
            CardActionManager.Instance.HighlightCastableCards(TurnManager.Instance.WhoseTurn);
            CardActionManager.Instance.HighlightMonstersWithAttacks(TurnManager.Instance.WhoseTurn);
        }
    }
Beispiel #11
0
    /// <summary>
    /// Se suelta la carta o ente.
    /// </summary>
    public void End()
    {
        if (!dragging)
        {
            //Mostrar previsualizacion y menu
            if (da.SePuedeControlar)
            {
                GetComponent <OpcionesObjeto>().MostrarOpciones();
            }
        }
        else
        {
            OpcionesObjeto.PrevisualizacionesPermitidas = true;
            _draggingThis = null;
            if (da.SePuedeArrastrar)
            {
                da.OnEndDrag();
            }

            dragging = false;
        }
    }