Exemplo n.º 1
0
        /// <summary>
        /// Рисует лабиринт и персонажа
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void FormLevel1_Activated(object sender, EventArgs e)
        {
            gen = gl;
            Bitmap   flag         = new Bitmap(pB_POLE.Width, pB_POLE.Height);
            Graphics flagGraphics = Graphics.FromImage(flag);

            gl.generateLabirynth(width, height);
            gl.toScreen(width * sizeble, height * sizeble, flagGraphics);
            pB_POLE.Image      = flag;
            pB_Person.Location = new Point(20, 20);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Инициализация начальных переменных
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void FormLevel1_Load(object sender, EventArgs e)
 {
     width               = setting.width;
     height              = setting.height;
     sizeble             = setting.sizeble;
     level               = setting.level;
     this.pB_Person.Size = new Size(sizeble / 2, sizeble / 2);
     time = 0;
     timer1.Start();
     timer2.Start();
     timer2Param  = timer2;
     timerParam   = timer1;
     l_time.Text  = "00:00";
     l_level.Text = level;
     timeResult   = l_time.Text;
     gl           = new GenerateLabyrinth(sizeble);
 }