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;
    }