Пример #1
0
        private void Restart()
        {
            //Game = false;
            my_timer.Stop();


            switch ((score0 + score1) % 4)
            {
            case 0:
            case 2:
                player[0] = new Lightcycle(500, 375, Color.Red);
                player[1] = new Lightcycle(500, 125, Color.Blue);
                break;

            case 1:
            case 3:
                player[0] = new Lightcycle(375, 500, Color.Red);
                player[1] = new Lightcycle(125, 500, Color.Blue);
                break;
            }
            graphics.Clear(SystemColors.Control);
            player[0].dir = (score0 + score1) % 4;
            player[1].dir = (score0 + score1) % 4;

            IntroInfo.Visible = true;
        }
Пример #2
0
 public Menu()
 {
     InitializeComponent();
     //graphics = new Graphics();
     player[0]         = new Lightcycle(375, 500, Color.Red);
     player[1]         = new Lightcycle(125, 500, Color.Blue);
     my_timer.Interval = 75;
     my_timer.Tick    += Update;
 }