Exemplo n.º 1
0
    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;
    }