Esempio n. 1
0
 /// <summary>
 ///     Sets all game settings.
 /// </summary>
 /// <param name="settings">The settings instance.</param>
 protected override void OnConfigure(Settings settings)
 {
     settings.Resolution.SetBaseResolution(1280, 720);
     settings.Resolution.SetResolution(1280, 720, false);
     settings.VerticalSync = false;
     settings.UseFixedTimestep = false;
     settings.IsCursorVisible = true;
 }
Esempio n. 2
0
        /// <summary>
        ///     Initializes the services.
        /// </summary>
        private void InitializeServices(GameServiceContainer services)
        {
            ResourceContents = new ResourceContentManager(services, "Content");
            services.AddService(typeof (ResourceContentManager), ResourceContents);

            Time = new TimeManager();
            services.AddService(typeof (TimeManager), Time);

            Camera = new CameraManager();
            services.AddService(typeof (CameraManager), Camera);

            Audio = new AudioManager();
            services.AddService(typeof (AudioManager), Audio);

            if (!windows)
            {
                DeviceManager = new GraphicsDeviceManager(Application);
                services.AddService(typeof (GraphicsDeviceManager), DeviceManager);
            }

            Settings = new Settings();
            services.AddService(typeof (Settings), Settings);

            Resources = new ResourceManager(ResourceContents);
            services.AddService(typeof (ResourceManager), Resources);

            Input = new InputManager();
            services.AddService(typeof (InputManager), Input);

            Scenes = new SceneManager();
            services.AddService(typeof (SceneManager), Scenes);

            InitializeExports();
        }
Esempio n. 3
0
 /// <summary>
 ///     Setups all game settings.
 /// </summary>
 /// <param name="settings">The settings instance.</param>
 protected abstract void OnConfigure(Settings settings);