Beispiel #1
0
    public void DropPiece()
    {
        if (moving == null)
        {
            return;
        }

        Debug.Log("Dropped");
        if (game.getValueAtPoint(newIndex) == 6)
        {
            game.bombExplose(newIndex, 3);
        }
        else if (game.getValueAtPoint(newIndex) == 7)
        {
            game.bombExplose(newIndex, 5);
        }
        else
        {
            if (!newIndex.Equals(moving.index))
            {
                game.FlipPieces(moving.index, newIndex, true);
            }
            else
            {
                game.ResetPiece(moving);
            }
        }
        moving = null;
    }
Beispiel #2
0
 // Called from NodePiece when mouse button is released. If so, reset the piece from the Match3 script.
 public void DropPiece()
 {
     if (moving == null)
     {
         return;
     }
     if (!newIndex.Equals(moving.index))
     {
         game.FlipPieces(moving.index, newIndex, true);
     }
     else
     {
         game.ResetPiece(moving);
     }
     moving = null;
 }
Beispiel #3
0
    public void DropPiece()
    {
        if (_moving == null)
        {
            return;
        }

        if (!_newIndex.Equals(_moving.Index))
        {
            _game.FlipPieces(_moving.Index, _newIndex, true);
        }
        else
        {
            _game.ResetPiece(_moving);
        }

        _moving = null;
    }
Beispiel #4
0
 public void DropPiece()
 {
     if (moving == null)
     {
         return;
     }
     Debug.Log("Dropped");
     if (!newIndex.Equals(moving.index))
     {
         // Flip the pieces around on the board
         game.FlipPieces(moving.index, newIndex, true);
     }
     else
     {
         // Reset the piece back to original spot
         game.ResetPiece(moving);
     }
     moving = null;
 }