Esempio n. 1
0
        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";
        }
Esempio n. 2
0
 /// <summary>
 /// Constructor for the main gameplay screen
 /// </summary>
 /// <param name="camera">Camera to draw elements correctly</param>
 public GameplayScreen(Camera camera)
 {
     this.camera = camera;
 }