Exemple #1
0
 /// <summary>
 /// Allows the game to perform any initialization it needs to before starting to run.
 /// This is where it can query for any required services and load any non-graphic
 /// related content.  Calling base.Initialize will enumerate through any components
 /// and initialize them as well.
 /// </summary>
 protected override void Initialize()
 {
     Camera2 cam = new Camera2();
     this.ballView = new BallView(GraphicsDevice, Content);
     this.ballSim = new BallSimulation();
     base.Initialize();
 }
Exemple #2
0
        /// <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);

            Camera camera = new Camera(GraphicsDevice.Viewport);
            ballView = new BallView(ballSimulation, camera, GraphicsDevice, Content.Load<Texture2D>("ball"));
        }