void Update() { if (!GamePause.isPaused() && transform.childCount == 0) { pushBlock(); } }
void Update() { if (activated && Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Began) { if (!GamePause.isPaused() && isExtraWindowsDisabled()) { touchPos = Camera.main.ScreenToWorldPoint(Input.GetTouch(0).position); if (toRotate()) { blocks.getBlock().GetComponent <Block>().rotate(); } else if (toMoveDown()) { blocks.getBlock().GetComponent <Block>().speedUp = true; } else if (toTurnLeft()) { blocks.getBlock().GetComponent <Block>().turnLeft(); } else { blocks.getBlock().GetComponent <Block>().turnRight(); } } else { GamePause.deactivateAnimated(); } } }
void Update() { if (!GamePause.isPaused()) { if (detector.canMoveVertical(actitveRotation)) { if (timer <= 0) { moveTilesVertical(); if (!speedUp) { timer = fallTimer; } else { timer = fallTimer / moveDownMultiplier; } } else { timer -= Time.deltaTime; } } else { managerBlocks.pushBlock(); destroy(); } } }
public void rotate() { if (!GamePause.isPaused() && !endgame.isActive()) { blocks.getBlock().GetComponent <Block>().rotate(); } else if (GamePause.isPaused() && !endgame.isActive()) { GamePause.deactivateAnimated(); } }
public void moveDown() { if (!GamePause.isPaused() && !endgame.isActive()) { blocks.getBlock().GetComponent <Block>().speedUp = true; } else if (GamePause.isPaused() && !endgame.isActive()) { GamePause.deactivateAnimated(); } }
void Update() { if (activated && Input.touchCount > 0 && isExtraWindowsDisabled()) { if (!GamePause.isPaused()) { if (isSwipeEnd() && isMovedMinimumDistance()) { if (isSwpiedHorizontal()) { swipeHorizontal(); } else { swipeVertical(); } } } else { GamePause.deactivateAnimated(); } } }