示例#1
0
    //检测是否还有可以相连
    bool CheckCanLian()
    {
        List <ComBox> allBoxs = boxManager.GetAllRow();

        foreach (ComBox box in allBoxs)
        {
            box.check = false;
        }
        foreach (ComBox box in allBoxs)
        {
            if (!box.check)
            {
                List <ComBox> sameBoxs = boxManager.GetSameBoxs(box);
                foreach (ComBox same in sameBoxs)
                {
                    Debug.Log(same.index);
                    if (boxManager.LinkTwoBox(box, same) != null)
                    {
                        return(true);
                    }
                }
            }
        }
        return(false);
    }