Exemplo n.º 1
0
        public override void CreateBricks()
        {
            bricks = new List <Brick>();

            for (int y = 1; y < 5; y++)
            {
                for (int x = 1; x < 19; x++)
                {
                    Brick brick = null;
                    if ((y + x) % 2 == 0)
                    {
                        brick = new RedBrick(game);
                    }
                    else
                    {
                        brick = new Brick(game);
                    }
                    brick.Position = new Vector2(x * brickSize, y * brickSize);
                    bricks.Add(brick);
                    SceneComponents.Add(brick);
                }
            }
        }
Exemplo n.º 2
0
        public override void CreateBricks()
        {
            bricks = new List<Brick>();

            for (int y = 1; y < 5; y++)
            {
                for (int x = 1; x < 19; x++)
                {
                    Brick brick = null;
                    if ((y + x) % 2 == 0)
                    {
                        brick = new RedBrick(game);
                    }
                    else
                    {
                        brick = new Brick(game);
                    }
                    brick.Position = new Vector2(x * brickSize, y * brickSize);
                    bricks.Add(brick);
                    SceneComponents.Add(brick);
                }
            }
        }