コード例 #1
0
ファイル: Form1.cs プロジェクト: pezs89/Brickbreaker_Old
        /// <summary>
        /// Drawing the bricks.
        /// </summary>
        public void TeglatKirajzol()
        {
            if (brick.Count != 0)
            {
                brick.Clear();

                for (int j = 0; j < ClientSize.Width; j += 40)
                {
                    for (int i = 20; i < ClientSize.Height / 2; i += 20)
                    {
                        tegla t = new tegla(j, i, 40, 20, Brushes.Aqua, Pens.Beige);
                        brick.Add(t);
                    }
                }

                tegladarab = brick.Count;
            }
            else
            {
                for (int j = 0; j < ClientSize.Width; j += 40)
                {
                    for (int i = 20; i < ClientSize.Height / 2; i += 20)
                    {
                        tegla t = new tegla(j, i, 40, 20, Brushes.Aqua, Pens.Beige);
                        brick.Add(t);
                    }
                }

                tegladarab = brick.Count;
            }
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: pezs89/Brickbreaker_Old
        /// <summary>
        /// Drawing the bricks.
        /// </summary>
        public void TeglatKirajzol()
        {
            if (brick.Count != 0)
            {
                brick.Clear();

                for (int j = 0; j < ClientSize.Width; j += 40)
                {
                    for (int i = 20; i < ClientSize.Height / 2; i += 20)
                    {
                        tegla t = new tegla(j, i, 40, 20, Brushes.Aqua, Pens.Beige);
                        brick.Add(t);
                    }
                }

                tegladarab = brick.Count;
            }
            else
            {
                for (int j = 0; j < ClientSize.Width; j += 40)
                {
                    for (int i = 20; i < ClientSize.Height / 2; i += 20)
                    {
                        tegla t = new tegla(j, i, 40, 20, Brushes.Aqua, Pens.Beige);
                        brick.Add(t);
                    }
                }

                tegladarab = brick.Count;
            }
        }