/// <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, Content, ballSimulation);

            // TODO: use this.Content to load your game content here
        }
Example #2
0
        // ContentManager content;
        // GraphicsDeviceManager graphics;
        //  SpriteBatch spriteBatch;

        public BallView(GraphicsDeviceManager graphics, ContentManager content, BallSimulation ballSimulation)
        {
            box = new Texture2D(graphics.GraphicsDevice, 1, 1);
            box.SetData <Color>(new Color[]
            {
                Color.White
            });
            camera           = new Camera(graphics.GraphicsDevice.Viewport);
            globe            = content.Load <Texture2D>("globe.png");
            m_ballSimulation = ballSimulation;
        }
        /// <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, Content, ballSimulation);

            // TODO: use this.Content to load your game content here

        }
Example #4
0
 // ContentManager content;
 // GraphicsDeviceManager graphics;
 //  SpriteBatch spriteBatch;
 public BallView(GraphicsDeviceManager graphics, ContentManager content, BallSimulation ballSimulation)
 {
     box = new Texture2D(graphics.GraphicsDevice, 1, 1);
     box.SetData<Color>(new Color[]
         {
             Color.White
         });
     camera = new Camera(graphics.GraphicsDevice.Viewport);
     globe = content.Load<Texture2D>("globe.png");
     m_ballSimulation = ballSimulation;
 }