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(); } }
public void moveBlock(Vector2 dest) { Blick oldBlick = getBlick(); oldBlick.setSettled(false); oldBlick.setOccupied(false); oldBlick.block = null; blickPos = dest; updateBlick(); }
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(); }