public void changeLevel() { Components.Remove(main); Components.Remove(player); CurrentLevel = 2; sprite = Content.Load<Texture2D>("Bubbles"); BubbleCreator.setXNA(this, sprite); main = new BoardMain(this, sprite, CurrentLevel); arrowSprite = Content.Load<Texture2D>("Arrow"); player = new BoardPlayer(this, sprite, arrowSprite); BubbleHolder.score = 0; Components.Add(main); Components.Add(player); }
public BoardGame(Game game, int lvl) : base(game) { bubbleBoard = new BoardMain(game, lvl); playerBoard = new BoardPlayer(game); }
protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); Services.AddService(typeof(SpriteBatch),spriteBatch); sprite = Content.Load<Texture2D>("Bubbles"); BubbleCreator.setXNA(this, sprite); main = new BoardMain(this, sprite, CurrentLevel); arrowSprite = Content.Load<Texture2D>("Arrow"); player = new BoardPlayer(this, sprite, arrowSprite); wall = new Texture2D(GraphicsDevice, 1, 1, false, SurfaceFormat.Color); wall.SetData(new[] { Color.White }); Components.Add(main); Components.Add(player); }