Exemplo n.º 1
0
    bool AddRow(Color color, bool force = false)
    {
        // search for vacant spots
        // MUTEX
        Debug.Log("StoryOfASound: Looking for empty row");
        GridRect emptyRow = board.FindEmptyRow();

        Debug.Log("Found empty row" + emptyRow);
        if (emptyRow == null)
        {
            emptyRow = new GridRect(0, Random.Range(0, rows), cols, 1);
            foreach (var ge in board.GraphicEntities())
            {
                ge.DeleteRect(emptyRow, Beat(1));
            }
        }

        var newGe = GraphicEntity1.New(emptyRow, board);

        newGe.SetColor(color);
        //newGe.SetOpacity(1, Beat(1));
        return(true);
    }