示例#1
0
    void breakMatch(List <Transform> l_trs)
    {
        List <Transform>         alreadycheck = new List <Transform>();
        List <List <Transform> > list_success = new List <List <Transform> >();

        foreach (var trs in l_trs)
        {
            if (!alreadycheck.Contains(trs))
            {
                var match = CheckSameNear(trs);
                alreadycheck.AddRange(match);
                if (match.Count >= min_success)
                {
                    list_success.Add(match);
                }
            }
        }

        foreach (var gr_ball in list_success)
        {
            foreach (var ball in gr_ball)
            {
                //ball.GetComponent<Renderer>().material.color = Color.black;
                creator_script.Breakball(ball.gameObject);
                if (ball.childCount > 0 && ball.GetChild(0).name == "AddTurn(Clone)")
                {
                    Status_script.AddTurns(1);
                }
            }
            Status_script.AddScores(gr_ball.Count);
        }
        if (list_success.Count > 0)
        {
            Slot_script.StartCheck();
        }
    }