IEnumerator fallingGap() { yield return(new WaitForSeconds(fallingSpeed)); //If reach the bottom, create new puyo if (PuyoController.reachBottom((int)controlMainPuyo.getPosition().x, (int)controlMainPuyo.getPosition().y) || PuyoController.reachBottom((int)controlSubPuyo.getPosition().x, (int)controlSubPuyo.getPosition().y)) { if (PuyoController.isGameOver()) { gameOverObj.SetActive(true); gameStatus = GameStatus.GamePause; } else { int mainX = (int)controlMainPuyo.getPosition().x; int mainY = (int)controlMainPuyo.getPosition().y; int subX = (int)controlSubPuyo.getPosition().x; int subY = (int)controlSubPuyo.getPosition().y; puyoArr[mainX, mainY] = controlMainPuyo; puyoArr[subX, subY] = controlSubPuyo; gameStatus = GameStatus.PuyoArranging; } } else { PuyoController.puyoDown(true); } falling = true; }
IEnumerator fallingGap() { yield return(new WaitForSeconds(fallingSpeed)); //If reach the bottom, create new puyo if (controller.reachBottom((int)controlMainPuyo.getPosition().x, (int)controlMainPuyo.getPosition().y) || controller.reachBottom((int)controlSubPuyo.getPosition().x, (int)controlSubPuyo.getPosition().y)) { int mainX = (int)controlMainPuyo.getPosition().x; int mainY = (int)controlMainPuyo.getPosition().y; int subX = (int)controlSubPuyo.getPosition().x; int subY = (int)controlSubPuyo.getPosition().y; puyoArr[mainX, mainY] = controlMainPuyo; puyoArr[subX, subY] = controlSubPuyo; gameStatus = GameStatus.PuyoArranging; controller.checkTowerTooHigh(); } else { controller.puyoDown(true); } falling = true; }