public Scene(string name, AvocadoGame game)
        {
            Game = game;
            Name = name;
            graphicsDevice = game.GraphicsDevice;
            Content = new ContentManager(game.Services);
            BackgroundColor = Color.Black;

            var settings = Game.GameSettings;
            ViewportAdapter adapter = null;

            switch (settings.ViewportType)
            {
                case ViewportType.Default:
                    adapter = new DefaultViewportAdapter(Game.GraphicsDevice);
                    break;

                case ViewportType.Scaling:
                    adapter = new ScalingViewportAdapter(game.GraphicsDevice, settings.VirtualResolution.X, settings.VirtualResolution.Y);
                    break;

                case ViewportType.Window:
                    adapter = new WindowViewportAdapter(game.Window, graphicsDevice);
                    break;
            }
            Camera = new Camera(adapter);

            EntityManager = new EntityManager(this);
            CollisionManager = new CollisionManager(this);
            BehaviorManager = new BehaviorManager(this);
            RenderManager = new RenderManager(this, graphicsDevice);
        }
 public RenderManager(Scene scene, GraphicsDevice graphicsDevice)
     : base(scene)
 {
     this.scene = scene;
     this.camera = scene.Camera;
     this.graphicsDevice = graphicsDevice;
     drawables = new List<Drawable>();
     stopwatch = new Stopwatch();
 }