Example #1
0
        protected override void Initialize()
        {
            ContentManager.RootDirectory = "Content";
            graphics.PreferredBackBufferWidth = 800;
            graphics.PreferredBackBufferHeight = 480;
            graphics.ApplyChanges();
            IsMouseVisible = true;

            camera = new Camera2D(GraphicsDevice, input);
            this.Services.AddService(camera.GetType(), camera);

            base.Initialize();
        }
Example #2
0
 protected override void LoadContent()
 {
     camera = (Camera2D)Game.Services.GetService(typeof(Camera2D));
     spriteBatch = new SpriteBatch(GraphicsDevice);
     base.LoadContent();
 }