protected override void LoadContent() { _spriteBatch = new SpriteBatch(GraphicsDevice); _cursorTexture = Content.Load <Texture2D>("Sprites/ui/walk-cursor"); var uiContentStorage = ServiceProvider.GetRequiredService <IUiContentStorage>(); uiContentStorage.LoadContent(Content); var personVisualizationContentStorage = ServiceProvider.GetRequiredService <IPersonVisualizationContentStorage>(); personVisualizationContentStorage.LoadContent(Content); var gameobjectVisualizationContentStorage = ServiceProvider.GetRequiredService <IGameObjectVisualizationContentStorage>(); gameobjectVisualizationContentStorage.LoadContent(Content); var personSoundContentStorage = ServiceProvider.GetRequiredService <IPersonSoundContentStorage>(); personSoundContentStorage.LoadContent(Content); var uiSoundStorage = ServiceProvider.GetRequiredService <IUiSoundStorage>(); uiSoundStorage.LoadContent(Content); UiThemeManager.SoundStorage = uiSoundStorage; var sceneManager = new ScreenManager(this); var titleScene = new TitleScreen(this, _spriteBatch); sceneManager.ActiveScreen = titleScene; Components.Add(sceneManager); #if DEBUG var fpsCounter = new FpsCounter(this, _spriteBatch, Content.Load <SpriteFont>("Fonts/Main")); Components.Add(fpsCounter); var cheatInput = new CheatInput(this, _spriteBatch, Content.Load <SpriteFont>("Fonts/Main")); Components.Add(cheatInput); #endif }
protected override void LoadContent() { _spriteBatch = new SpriteBatch(GraphicsDevice); _cursorTexture = Content.Load <Texture2D>("Sprites/ui/walk-cursor"); var uiContentStorage = ServiceProvider.GetRequiredService <IUiContentStorage>(); uiContentStorage.LoadContent(Content); var personVisualizationContentStorage = ServiceProvider.GetRequiredService <IPersonVisualizationContentStorage>(); personVisualizationContentStorage.LoadContent(Content); var gameobjectVisualizationContentStorage = ServiceProvider.GetRequiredService <IGameObjectVisualizationContentStorage>(); gameobjectVisualizationContentStorage.LoadContent(Content); var personSoundContentStorage = ServiceProvider.GetRequiredService <IPersonSoundContentStorage>(); personSoundContentStorage.LoadContent(Content); var uiSoundStorage = ServiceProvider.GetRequiredService <IUiSoundStorage>(); uiSoundStorage.LoadContent(Content); UiThemeManager.SoundStorage = uiSoundStorage; var screenManager = new ScreenManager(this); var titleScreen = new TitleScreen(this, _spriteBatch); screenManager.ActiveScreen = titleScreen; Components.Add(screenManager); var font = Content.Load <SpriteFont>("Fonts/Main"); #if DEBUG var fpsCounter = new FpsCounter(this, _spriteBatch, font); Components.Add(fpsCounter); var cheatInput = new CheatInput(this, _spriteBatch, font); Components.Add(cheatInput); _graphics.IsFullScreen = false; _graphics.PreferredBackBufferWidth = 800; _graphics.PreferredBackBufferHeight = 480; _graphics.ApplyChanges(); #endif var soundtrackManagerComponent = new SoundtrackManagerComponent(this); var soundtrackManager = ServiceProvider.GetRequiredService <SoundtrackManager>(); var titleSong = Content.Load <Song>("Audio/TitleBackgroundTrack"); soundtrackManager.Initialize(titleSong); soundtrackManagerComponent.Initialize(soundtrackManager); Components.Add(soundtrackManagerComponent); #if !DEBUG _graphics.IsFullScreen = true; _graphics.PreferredBackBufferWidth = 1280; _graphics.PreferredBackBufferHeight = 720; _graphics.ApplyChanges(); #endif var versionDisplay = new VersionDisplay(this, _spriteBatch, font); Components.Add(versionDisplay); }