Beispiel #1
0
    void DropYPanels(int x)
    {
        for (var y = 0; y < mapY - 1; y++)
        {
            PanelController panel = panels[x, y];
            if (panel != null)
            {
                continue;
            }

            // 空きスペースを詰める
            for (var y2 = y + 1; y2 < mapY; y2++)
            {
                PanelController newPanel = panels[x, y2];
                if (newPanel != null)
                {
                    newPanel.ChangeNumberByDrop();
                    droppingPanelCount++;

                    ReplacePanelPosition(newPanel, x, y, x, y2);
                    break;
                }
            }
        }
    }