Exemplo n.º 1
0
    void CollapseAnimation(object sender, Tetris.RowCollapseEventArgs args)
    {
        List <int> list = new List <int>(args.ClearedRows);

        list.Sort();
        list.Reverse();

        int offset = 0;

        foreach (int row in list)
        {
            moveAllAbove(row + offset, board.PrefabSize.y);

            IEnumerator c = moveOverTime(row + offset, board.PrefabSize.y);
            StartCoroutine(c);
            offset++;
        }
    }
Exemplo n.º 2
0
    void Game_BoardController_RowCollapsed(object sender, Tetris.RowCollapseEventArgs e)
    {
        rowCollapsed = true;
        int[] basicScores = { Single, Double, Triple, Tetris };
        int   thisScore   = 0;

        if (e.ClearedRows.Count > 3)
        {
            if (prevTetris)
            {
                thisScore += B2BTetris;
            }
            else
            {
                thisScore += Tetris;
            }
            prevTetris = true;
        }
        else
        {
            thisScore += basicScores [e.ClearedRows.Count - 1];
            prevTetris = false;
        }

        thisScore += residual;
        thisScore += comboLevel * ComboPoints;
        score     += thisScore;

        int sentScore = thisScore / 100;

        residual = thisScore % 100;

        if (PlayerScored != null)
        {
            PlayerScored(this, sentScore);
        }
    }
Exemplo n.º 3
0
 void Board_RowCollapsed(object sender, Tetris.RowCollapseEventArgs e)
 {
     Collapse.PlayOneShot(Collapse.clip);
 }