Example #1
0
        /// <summary>
        /// Constructor
        /// </summary>
        public arkanoid()
        {
            InitializeComponent();
            wld = new Bitmap(20 * _mult, 20 * _mult);
            g   = Graphics.FromImage(wld);

            b           = new bola(6 * Math.PI / 8);
            padd        = new Base();
            padd.tamano = 80;
            padd.Y      = 750;

            b.tamano = (int)(0.5 * _mult);
            b.X      = 5 * _mult;
            b.Y      = 5 * _mult;

            for (int i = 0; i < 10; i++)
            {
                for (int j = 0; j < 6; j++)
                {
                    bloques[i, j]       = new Bloque();
                    bloques[i, j].X     = 5 + i * 80;
                    bloques[i, j].Y     = 20 + j * 40;
                    bloques[i, j].color = Color.Blue;
                    bloques[i, j].ouch += arkanoid_ouch;
                }
            }

            pictureBox1.Image = wld;
            refreshGame();
        }
Example #2
0
        /// <summary>
        /// Constructor
        /// </summary>
        public arkanoid()
        {
            InitializeComponent();
            wld = new Bitmap(20 * _mult, 20 * _mult);
            g = Graphics.FromImage(wld);

            b = new bola(6 * Math.PI / 8);
            padd = new Base();
            padd.tamano = 80;
            padd.Y = 750;

            b.tamano = (int)(0.5 * _mult);
            b.X = 5 * _mult;
            b.Y = 5 * _mult;

            for (int i = 0; i < 10; i++)
            {

                for (int j = 0; j < 6; j++)
                {
                    bloques[i, j] = new Bloque();
                    bloques[i, j].X = 5 + i * 80;
                    bloques[i, j].Y = 20 + j * 40;
                    bloques[i, j].color = Color.Blue;
                    bloques[i, j].ouch += arkanoid_ouch;
                }
            }

            pictureBox1.Image = wld;
            refreshGame();
        }