private void sTARTToolStripMenuItem_Click(object sender, EventArgs e) { newgame(); music m = new music(); m.bgsound(); }
private void timer1_Tick(object sender, EventArgs e) { if (t.pnumLineas < constants.scountlv) { showrealtime(); lblNumLine.Text = t.numLineas.ToString(); lblScore.Text = Tetris.score.ToString(); if (down) { showrealtime(); } else { down = true; showrealtime(); down = false; } nextbrick(t.BrickSiguiente); if (t.end) { music m = new music(); m.winner(); timer1.Stop(); timer2.Stop(); highscore = Tetris.score; Form2 f2 = new Form2(); f2.addscore(highscore); MessageBox.Show("Game Over!! your score " + highscore); } } else { lblNumLine.Text = t.numLineas.ToString(); lblScore.Text = Tetris.score.ToString(); constuct(); t.levelup(); lblv.Text = ((int)t.level + 1).ToString(); timer1.Interval = constants.NIVELES(t.level); } }