protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);

            screenManager = new ScreenManager();
            screenManager.Push(new GameScreen(screenManager));
            levelbuilder = new LevelBuilder();
        }
Exemple #2
0
 public GameScreen(ScreenManager _screenManager)
     : base(_screenManager)
 {
     paddle = new Paddle();
     ball   = new Ball(paddle);
     paddle.SetChild(ball);
     builder = new LevelBuilder();
     // TODO allow save progression
     // Load level from file
     builder.SetLevel(1);
     builder.Build();
     blocks = builder.GetLevelBlocks();
     foreach (Block block in blocks)
     {
         block.SetBallObject(ball);
         block.SetPaddleObject(paddle);
     }
 }