Tried cleaning things up. Idk.
This commit is contained in:
parent
a06c5ec4ff
commit
e3946c526f
@ -10,7 +10,7 @@
|
||||
|
||||
#-------------------------------- References --------------------------------#
|
||||
|
||||
/reference:..\..\..\RecrownedAthenaeum\RecrownedAthenaeum.Pipeline\bin\Release\netstandard2.0\publish\RecrownedAthenaeum.Pipeline.dll
|
||||
/reference:..\..\..\RecrownedAthenaeum\RecrownedAthenaeum.Pipeline\bin\Debug\netstandard2.0\publish\RecrownedAthenaeum.Pipeline.dll
|
||||
|
||||
#---------------------------------- Content ---------------------------------#
|
||||
|
||||
|
@ -11,7 +11,7 @@ with.
|
||||
<!--
|
||||
Modify this string to change the font that will be imported.
|
||||
-->
|
||||
<FontName>Darktech_ldr</FontName>
|
||||
<FontName>darktech_ldr</FontName>
|
||||
|
||||
<!--
|
||||
Size is a float value, measured in points. Modify this value to change
|
||||
|
@ -38,7 +38,7 @@ namespace RhythmBullet.ContentResolvers
|
||||
}
|
||||
}
|
||||
|
||||
Resolution[] resolutions = {
|
||||
public Resolution[] resolutions = {
|
||||
new Resolution(1920, 1080),
|
||||
new Resolution(2560, 1440),
|
||||
new Resolution(3840, 2160)
|
||||
|
@ -40,12 +40,18 @@ namespace RhythmBullet
|
||||
internal readonly MusicController musicController;
|
||||
private SkinManager skinManager = new SkinManager();
|
||||
private ISkin Skin { get { return skinManager.Skin; } }
|
||||
|
||||
private ResolutionContentResolver resolutionContentResolver = new ResolutionContentResolver();
|
||||
private FontContentResolver fontContentResolver;
|
||||
public RhythmBulletGame()
|
||||
{
|
||||
graphics = new GraphicsDeviceManager(this);
|
||||
Content.RootDirectory = "Content";
|
||||
assets = new ContentManagerController(Content);
|
||||
//Add the content resolvers.
|
||||
assets.AddContentPathResolver(typeof(Texture2D), resolutionContentResolver);
|
||||
fontContentResolver = new FontContentResolver(resolutionContentResolver);
|
||||
assets.AddContentPathResolver(typeof(SpriteFont), fontContentResolver);
|
||||
|
||||
musicController = new MusicController();
|
||||
preferencesManager = new PreferencesManager(
|
||||
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "/RhythmBullet",
|
||||
@ -82,6 +88,7 @@ namespace RhythmBullet
|
||||
Camera = new Camera2D(resolution.Width, resolution.Height, cameraEffect);
|
||||
Debug.WriteLine("Initial setup complete.");
|
||||
base.Initialize();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -95,7 +102,11 @@ namespace RhythmBullet
|
||||
|
||||
screenManager = new ScreenManager(graphics);
|
||||
screenManager.NeedNextScreen += ShowFirstScreen;
|
||||
General general = preferencesManager.GetPreferences<General>();
|
||||
Resolution resolution = general.Resolution;
|
||||
QueueContent();
|
||||
resolutionContentResolver.Height = resolution.Height;
|
||||
resolutionContentResolver.Width = resolution.Width;
|
||||
screenManager.Screen = new LoadingScreen(this, Content.Load<Texture2D>("RhythmBullet"), 0.7f);
|
||||
}
|
||||
|
||||
@ -146,12 +157,20 @@ namespace RhythmBullet
|
||||
base.Draw(gameTime);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the world constants, unloads all assets, queues the new batch, and resizes the virtual screens.
|
||||
/// Finishes by updating the cursor size.
|
||||
/// </summary>
|
||||
/// <param name="width">New window width.</param>
|
||||
/// <param name="height">New window height.</param>
|
||||
public void Resize(int width, int height)
|
||||
{
|
||||
pixels_per_WU = height / WORLD_HEIGHT;
|
||||
graphics.PreferredBackBufferWidth = width;
|
||||
graphics.PreferredBackBufferHeight = height;
|
||||
assets.UnloadAll();
|
||||
resolutionContentResolver.Height = height;
|
||||
resolutionContentResolver.Width = width;
|
||||
QueueContent();
|
||||
screenManager.Resize(new LoadingScreen(this, Content.Load<Texture2D>("loading_ring"), 0.4f, true));
|
||||
UpdateCursor();
|
||||
@ -187,7 +206,7 @@ namespace RhythmBullet
|
||||
private void QueueContent()
|
||||
{
|
||||
assets.Queue<Texture2D>("cursor", false);
|
||||
assets.Queue<Texture2D>("title");
|
||||
assets.Queue<Texture2D>("title", false);
|
||||
assets.Queue<Texture2D>("default_cover", false);
|
||||
assets.Queue<TextureAtlas>("UI");
|
||||
assets.Queue<SpriteFont>("gasalt_regular");
|
||||
|
Loading…
Reference in New Issue
Block a user