Beispiel #1
0
    void OnActiveShapeLanded()
    {
        inputHandler.ResetHardDrop();

        if (gridHandler.AddToGrid(ActiveShape))
        {
            Destroy(ActiveShape.gameObject);

            var completedRows = gridHandler.GetCompletedRows();

            CheckMathEquation(completedRows);
            Debug.Log(completedRows.Count);
            ProcessLineRemoval(completedRows.Count);

            gridHandler.DeleteRows(completedRows);

            SpawnRandomShape(false);

            inUseFallDelay = Mathf.Max(0, fallDelay - scoreState.Level * decreaseFallDelayByLevel);
        }
        else
        {
            GameOver();
        }
    }