static public void NewBoxReadyToDown() { if (grid == null) { new Exception("缺少活动区域"); } if (waitingGrid == null) { new Exception("缺少等候区域"); } if (WaitingBox == null) { WaitingBox = BoxFactory.GetRandomBox(ref grid); } waitingGrid.Children.Clear(); if (waitingGrid == null) { ActivityBox = BoxFactory.GetRandomBox(ref grid); } else { ActivityBox = WaitingBox; } ActivityBox.OnButtom += ActivityBox_OnButtom; ActivityBox.Ready(); ActivityBox.AutoDown(); WaitingBox = BoxFactory.GetRandomBox(ref grid); waitingGrid.Children.Clear(); WaitingBox.ShowWaiting(ref waitingGrid); if (ActivityBox.IsOverlapping()) { ActivityBox.Pause(); if (OnGameOver != null) { OnGameOver(null, null); } } }