Example #1
0
        private void SetupGame()
        {
            Klucis.BackColor = Color.Transparent;
            Klucis.SizeMode  = PictureBoxSizeMode.StretchImage;
            Klucis.Width     = 50;
            Klucis.Height    = 50;
            Food.BackColor   = Color.Green;
            Food.BackColor   = Color.Transparent;
            Food.Image       = Properties.Resources.food_3;
            Food.SizeMode    = PictureBoxSizeMode.StretchImage;
            Enemy.BackColor  = Color.Transparent;
            Enemy.SizeMode   = PictureBoxSizeMode.StretchImage;
            Enemy.Width      = 40;
            Enemy.Height     = 40;
            this.BackColor   = Color.Blue;

            SetRandomEnemyDirection();

            UpdateScoreLabel();

            //initializing timers
            TimerKlucisMove.Start();
            TimerKlucisAnimate.Start();
            TimerEnemyAnimate.Start();
            TimerEnemyMove.Start();
        }
        private void SetupGame()
        {
            this.BackColor = Color.SkyBlue;

            Hero.BackColor = Color.Transparent;
            Hero.SizeMode  = PictureBoxSizeMode.StretchImage;
            Hero.Width     = 30;
            Hero.Height    = 30;

            UpdateScore();
            Food.BackColor = Color.Transparent;
            Food.SizeMode  = PictureBoxSizeMode.StretchImage;
            Food.Image     = Properties.Resources.food_1;
            Food.Width     = 18;
            Food.Height    = 18;

            Enemy.BackColor = Color.Transparent;
            Enemy.Width     = 30;
            Enemy.Height    = 30;
            Enemy.SizeMode  = PictureBoxSizeMode.StretchImage;

            TimerHeroAnimate.Start();
            TimerHeroMove.Start();
            TimerEnemyAnimate.Start();
            TimerEnemyMove.Start();
        }
Example #3
0
        private void SetupGame()
        {
            this.BackColor = Color.Blue;
            Hero.BackColor = Color.Transparent;
            Hero.SizeMode  = PictureBoxSizeMode.StretchImage;
            Hero.Width     = 50;
            Hero.Height    = 50;

            Food.BackColor = Color.Green;
            Food.BackColor = Color.Transparent;
            Food.Image     = Properties.Resources.food_4;

            Enemy.BackColor = Color.Transparent;
            Enemy.Width     = 40;
            Enemy.Height    = 40;
            Enemy.SizeMode  = PictureBoxSizeMode.StretchImage;

            SetRandomEnemyDirection();

            //initialize interface
            UpdateScoreLabel();

            //initializing timers
            TimerHeroMove.Start();
            TimerHeroAnimate.Start();
            TimerEnemyAnimate.Start();
            TimerEnemyMove.Start();
        }