Exemplo n.º 1
0
    public void update()
    {
        Blick thisBlock = getBlick();

        if (!GameController.accessGameController().blockInPlay&& isControlledByPlayer())
        {
            removePlayerControl();
        }
        if (blickPos.y != 0)
        {
            if (checkDown())
            {
                thisBlock.setSettled(false);
                fall();
            }
            else
            {
                thisBlock.setSettled(true);
                updateBlick();
            }
        }
        else
        {
            thisBlock.setSettled(true);
        }
        if (isControlledByPlayer() && thisBlock.isSettled())
        {
            removePlayerControl();
        }
    }
Exemplo n.º 2
0
    public void moveBlock(Vector2 dest)
    {
        Blick oldBlick = getBlick();

        oldBlick.setSettled(false);
        oldBlick.setOccupied(false);
        oldBlick.block = null;
        blickPos       = dest;
        updateBlick();
    }
Exemplo n.º 3
0
    public void removeBlock()
    {
        Blick thisBlick = getBlick();

        thisBlick.block = null;
        thisBlick.setSettled(false);
        thisBlick.setOccupied(false);
        GameObject thisBlock = getParentObject();

        thisBlock.tag += "[delete]";
        thisBlock.GetComponent <BlockScript> ().Remove();
    }