//检测可以掉落的 void CheckFallDown() { List <ComBox> allBoxs = boxManager.GetAllRow(); List <ComBox> topBoxs = boxManager.GetBoxListByRow(topRow); //把所有球状态设置为未连接 foreach (ComBox box in allBoxs) { box.link = false; box.check = false; } //遍历检测 foreach (ComBox box in topBoxs) { CheckFallBall(box); } foreach (ComBox box in allBoxs) { if (!box.link) { boxManager.RemoveBox(box); box.FallDown(); } } }