/// <summary> /// 下落方块 /// </summary> private void DownTricks() { if (CheckIsDown()) { CurrY++; } else { if (CurrY <= -3) { new WindowsMediaPlayer().Play(musicUrl.Over); IsGemaOver = true; timer.Stop(); timertime.Stop(); tbGameover.Visibility = Visibility.Visible; BgMediaPlay.Stop(); //GlobalModule.GlobalControl.MessageBoxDialog("游戏结束", "俄罗斯方块", MessageType.Prompt); return; } //下落完成,修改背景 for (int y = 0; y < 4; y++) { if (CurrY + y < 0) { continue; } for (int x = 0; x < 4; x++) { if (CurrTrick.CurrBlocks[y, x] != null) { CurrDeskBlocks[CurrY + y, CurrX + x] = CurrTrick.CurrBlocks[y, x]; } } } CheckSore(); NewTrick(); if (ShowDesk != null) { ShowDesk(null, null); } } if (ShowTrick != null) { ShowTrick(null, null); } }