Ejemplo n.º 1
0
        private void CountdownTimer_Tick(object sender, EventArgs e)
        {   //Countdown timer for image display in the beginning of the game
            int timer = Convert.ToInt32(label1.Text);

            timer      -= 1;
            label1.Text = Convert.ToString(timer);
            if (timer == 0)
            {
                CountdownTimer.Stop();
                TimeRemaining.Start();
            }
        }
Ejemplo n.º 2
0
 public void RestartGame()
 {
     foreach (KeyValuePair <int, Player> entry in PlayerIndex.ToArray())
     {
         entry.Value.Restart();
     }
     MobIndex.Clear();
     DropIndex.Clear();
     FallingBlockIndex.Clear();
     WorldMap.InitLevelFromRotation();
     TimeRemaining.Start(DEFAULT_TIME_REMAINING);
     RestartInterval.Reset();
     RedTent  = new Tent(true, WorldMap.RedTentPosition, ServerMode == GameMode.CaptureTheFlag, true);
     BlueTent = new Tent(false, WorldMap.BlueTentPosition, ServerMode == GameMode.CaptureTheFlag, true);
 }