Exemple #1
0
        private void TimeRemaining_Tick(object sender, EventArgs e)
        {   //Timer to show how much time is left to complete the level
            int timer = Convert.ToInt32(timeLeft.Text);

            timer        -= 1;
            timeLeft.Text = Convert.ToString(timer);
            if (timer == 0)
            {
                TimeRemaining.Stop();
                MessageBox.Show("You Scored " + ScoreCounter.Text + " at level : " + levelValue.Text);
                ScoreCounter.Text     = "0";
                resetButton.BackColor = Color.Red;
                resetButton.Text      = "Play Again?";
            }
        }