From 5e1554edf06440a9a33d1c62a958e28440fd3bd7 Mon Sep 17 00:00:00 2001 From: Recrown Date: Tue, 22 Jan 2019 19:33:42 -0600 Subject: [PATCH] reworked logic. --- RhythmBullet/Content/Content.mgcb | 2 +- RhythmBullet/Content/UI.tatlas | 12 ++++----- RhythmBullet/RhythmBullet.csproj | 6 ++--- RhythmBullet/RhythmBulletGame.cs | 43 +++++++++++++++++-------------- 4 files changed, 33 insertions(+), 30 deletions(-) diff --git a/RhythmBullet/Content/Content.mgcb b/RhythmBullet/Content/Content.mgcb index 5509758..9ee3226 100644 --- a/RhythmBullet/Content/Content.mgcb +++ b/RhythmBullet/Content/Content.mgcb @@ -10,7 +10,7 @@ #-------------------------------- References --------------------------------# -/reference:..\..\References\RecrownedAthenaeum.Pipeline\RecrownedAthenaeum.Pipeline.dll +/reference:..\..\References\RecrownedAthenaeum.Pipeline.dll #---------------------------------- Content ---------------------------------# diff --git a/RhythmBullet/Content/UI.tatlas b/RhythmBullet/Content/UI.tatlas index ec0bfa8..b738aa8 100644 --- a/RhythmBullet/Content/UI.tatlas +++ b/RhythmBullet/Content/UI.tatlas @@ -2,7 +2,7 @@ "regions": [ { "name": "Rounded9pButton-disabled", - "location": { + "bounds": { "X": 0, "Y": 0, "Width": 64, @@ -12,13 +12,13 @@ "textureName": "Rounded9pButton-disabled.png", "left": 25, "right": 25, - "down": 25, + "bottom": 0, "top": 25 } }, { "name": "Rounded9pButton-down", - "location": { + "bounds": { "X": 0, "Y": 64, "Width": 64, @@ -28,13 +28,13 @@ "textureName": "Rounded9pButton-down.png", "left": 25, "right": 25, - "down": 25, + "bottom": 0, "top": 25 } }, { "name": "Rounded9pButton", - "location": { + "bounds": { "X": 64, "Y": 0, "Width": 64, @@ -44,7 +44,7 @@ "textureName": "Rounded9pButton.png", "left": 25, "right": 25, - "down": 25, + "bottom": 0, "top": 25 } } diff --git a/RhythmBullet/RhythmBullet.csproj b/RhythmBullet/RhythmBullet.csproj index 8f0c2a7..ceafc77 100644 --- a/RhythmBullet/RhythmBullet.csproj +++ b/RhythmBullet/RhythmBullet.csproj @@ -57,14 +57,14 @@ + + - - @@ -80,7 +80,7 @@ False - ..\References\RecrownedAthenaeum\RecrownedAthenaeum.dll + ..\References\RecrownedAthenaeum.dll diff --git a/RhythmBullet/RhythmBulletGame.cs b/RhythmBullet/RhythmBulletGame.cs index 96ea8bd..c3e18be 100644 --- a/RhythmBullet/RhythmBulletGame.cs +++ b/RhythmBullet/RhythmBulletGame.cs @@ -1,21 +1,22 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; -using RecrownedAthenaeum.Audio; -using RecrownedAthenaeum.ContentResolvers; -using RecrownedAthenaeum.Preferences; -using RecrownedAthenaeum.Screens.MainMenu; using RecrownedAthenaeum.Camera; using RecrownedAthenaeum.ContentSystem; -using RecrownedAthenaeum.SpecialTypes; +using RecrownedAthenaeum.ContentSystem.ContentResolvers; using RecrownedAthenaeum.Input; using RecrownedAthenaeum.Persistence; using RecrownedAthenaeum.ScreenSystem; +using RecrownedAthenaeum.SpecialTypes; +using RecrownedAthenaeum.UI.Skin; +using RhythmBullet.Audio; +using RhythmBullet.Preferences; +using RhythmBullet.Screens.MainMenu; using System; using System.Diagnostics; -using RecrownedAthenaeum.UI.Skin; +using System.IO; -namespace RecrownedAthenaeum +namespace RhythmBullet { /// /// This is the main type for your game. @@ -61,6 +62,7 @@ namespace RecrownedAthenaeum Resolution resolution = preferencesManager.GetPreferences().Resolution; graphics.PreferredBackBufferWidth = resolution.Width; graphics.PreferredBackBufferHeight = resolution.Height; + RecrownedAthenaeum.Configuration.graphicsDeviceManager = graphics; } /// @@ -89,7 +91,7 @@ namespace RecrownedAthenaeum // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); Camera = new Camera2D(graphics.GraphicsDevice); - screenManager = new ScreenManager(graphics, Camera); + screenManager = new ScreenManager(Camera); screenManager.ShowFirstScreenEvent += ShowFirstScreen; QueueContent(); screenManager.Screen = new LoadingScreen(this, Content.Load("RhythmBullet"), 0.7f); @@ -113,21 +115,21 @@ namespace RecrownedAthenaeum /// Provides a snapshot of timing values. protected override void Update(GameTime gameTime) { - if (!assets.Done) + if (assets.Done) + { + if (resizing) + { + assets.Update(); + } + else if (!initialLoadComplete && CheckReadyForInitiate()) + { + Initiate(); + } + } + else { assets.Update(); } - else if (resizing) - { - resizing = false; - PostResize(); - } - else if (!initialLoadComplete) - { - Debug.WriteLine("Initial load complete."); - Initiate(); - } - screenManager.UpdateCurrentScreen(gameTime, CheckReadyForInitiate()); InputUtilities.Update(); @@ -201,6 +203,7 @@ namespace RecrownedAthenaeum private bool CheckReadyForInitiate() { + Debug.WriteLine(skinManager.ReadyForUse); return assets.Done && musicController.musicList.Searched && skinManager.ReadyForUse; }