展开全部
private void timer1_Tick(object sender, EventArgs e)
{
if (!currentBlock.Down())
{
if (currentBlock.Top() == 0)
{
//如果到顶则游戏结束
MessageBox.Show("Game Over!");
timer1.Stop();
return;
}
//否则计算分数并继续
int eraseLines = GameField.CheckLines();
if (eraseLines > 0)
{
score += GameField.width * eraseLines;
t_score.Text = score.ToString();
pictureBox1.Invalidate();
Application.DoEvents();
GameField.Redraw();
}
//产生下一个block
currentBlock = new Block(startLocation, nextBlock.blockType);
currentBlock.Draw(GameField.winHandle);
pictureBox2.Refresh();
nextBlock = new Block(new Point(8, 8), Block.BlockTypes.undefined);
nextBlock.Draw(pictureBox2.Handle);
}
currentBlock.Down();
}
{
if (!currentBlock.Down())
{
if (currentBlock.Top() == 0)
{
//如果到顶则游戏结束
MessageBox.Show("Game Over!");
timer1.Stop();
return;
}
//否则计算分数并继续
int eraseLines = GameField.CheckLines();
if (eraseLines > 0)
{
score += GameField.width * eraseLines;
t_score.Text = score.ToString();
pictureBox1.Invalidate();
Application.DoEvents();
GameField.Redraw();
}
//产生下一个block
currentBlock = new Block(startLocation, nextBlock.blockType);
currentBlock.Draw(GameField.winHandle);
pictureBox2.Refresh();
nextBlock = new Block(new Point(8, 8), Block.BlockTypes.undefined);
nextBlock.Draw(pictureBox2.Handle);
}
currentBlock.Down();
}
ZESTRON
2024-09-04 广告
2024-09-04 广告
表面污染分析包括评估表面上存在的颗粒、残留物或物质。通过利用显微镜、光谱学和色谱法等技术,分析人员可以识别和表征污染物,以确定其成分和来源。这种分析在电子、制药和制造等各个行业中至关重要,以确保产品质量、性能和安全性。了解表面污染有助于实施...
点击进入详情页
本回答由ZESTRON提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询