Exemple #1
0
        private void timer2_Tick(object sender, EventArgs e)
        {
            game.MoveShoot();
            game.checkBullets(Width, Height);
            game.MoveZombies();
            //game.HeroDead();
            game.checkDeadZombie();

            if (game.endGame)
            {
                timer1.Stop();
                timer2.Stop();
                if (MessageBox.Show("Game over! Would you like another try?", "Game over", MessageBoxButtons.OKCancel) == DialogResult.OK)
                {
                    game = new FinalGame();
                }
            }

            Invalidate();
        }
Exemple #2
0
 private void newGame()
 {
     game = new FinalGame();
     timer1.Start();
     timer2.Start();
 }