public UtilGame() { graphics = new GraphicsDeviceManager(this) { PreferredDepthStencilFormat = DepthFormat.Depth24Stencil8 }; // Initialize configuration object configuration = new Configuration(); // Initialize camera camera = new Camera(this); // Initialize the screen manager screenManager = new ScreenManager(this, camera, configuration, graphics); // Add the screen manager to the components list. // Components are special objects that respond to the draw and update loops // at a different time than the main application. The main implication of this // when using the screen manager is that you don't actually call draw or update // on the manager explicitly in this game loop. Components.Add(screenManager); Content.RootDirectory = "Content"; }
/// <summary> /// Constructs a new screen manager component. /// </summary> public ScreenManager(Game game, Camera c, Configuration con, GraphicsDeviceManager g) : base(game) { camera = c; config = con; graphics = g; }