Пример #1
0
        /// <summary>
        /// Initializes the WindowManager.
        /// </summary>
        /// <param name="content">The game content manager.</param>
        /// <param name="contentPath">The path where the ContentManager should load files from (including SpriteFont files).</param>
        public void Initialize(ContentManager content, string contentPath)
        {
            base.Initialize();

            Cursor = new Input.Cursor(this);
            Cursor.Initialize();
            Keyboard = new RKeyboard(Game);
            if (!AssetLoader.IsInitialized)
            {
                AssetLoader.Initialize(graphics.GraphicsDevice, content);
            }
            Renderer.Initialize(GraphicsDevice, content, contentPath);
            SoundPlayer = new SoundPlayer(Game);

            gameWindowManager = new WindowsGameWindowManager(Game);
            gameWindowManager.GameWindowClosing += GameWindowManager_GameWindowClosing;

            if (UISettings.ActiveSettings == null)
            {
                UISettings.ActiveSettings = new UISettings();
            }
#if XNA
            KeyboardEventInput.Initialize(Game.Window);
#endif
        }
Пример #2
0
 public GameStatusRetriever(IGameWindowManager gameWindowManager, IGameImageProcessor gameImageProcessor, IToImageConverter toImageConverter)
 {
     _gameWindowManager  = gameWindowManager;
     _gameImageProcessor = gameImageProcessor;
     _toImageConverter   = toImageConverter;
 }