/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); ballsimulation = new BallSimulation(); ballview = new Ballview(graphics, ballsimulation,Content); // TODO: use this.Content to load your game content here }
//Loads the sprites aswell as creating the board. public Ballview(GraphicsDeviceManager graphics, BallSimulation ballsimulation, ContentManager Content) { ball = Content.Load<Texture2D>("BALL.png"); box = new Texture2D(graphics.GraphicsDevice,1,1); box.SetData<Color>(new Color[] { Color.White }); camera = new Camera(graphics.GraphicsDevice.Viewport); ballSimulation = ballsimulation; }