reworked logic.
This commit is contained in:
parent
7d14d8cc64
commit
5e1554edf0
@ -10,7 +10,7 @@
|
||||
|
||||
#-------------------------------- References --------------------------------#
|
||||
|
||||
/reference:..\..\References\RecrownedAthenaeum.Pipeline\RecrownedAthenaeum.Pipeline.dll
|
||||
/reference:..\..\References\RecrownedAthenaeum.Pipeline.dll
|
||||
|
||||
#---------------------------------- Content ---------------------------------#
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
@ -57,14 +57,14 @@
|
||||
<Compile Include="Audio\SupportedFormats.cs" />
|
||||
<Compile Include="Audio\TransparentSampleProvider.cs" />
|
||||
<Compile Include="Audio\Visualizer\ReflectedHorizontalVisualizer.cs" />
|
||||
<Compile Include="ContentResolvers\FontContentResolver.cs" />
|
||||
<Compile Include="ContentResolvers\ResolutionContentResolver.cs" />
|
||||
<Compile Include="Screens\MainMenu\MainPage.cs" />
|
||||
<Compile Include="Screens\Transitions\FadeAwayTransition.cs" />
|
||||
<Compile Include="Screens\MainMenu\MainScreen.cs" />
|
||||
<Compile Include="RhythmBulletGame.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="ContentResolvers\FontContentResolver.cs" />
|
||||
<Compile Include="ContentResolvers\ResolutionContentResolver.cs" />
|
||||
<Compile Include="Preferences\Controls.cs" />
|
||||
<Compile Include="Preferences\General.cs" />
|
||||
</ItemGroup>
|
||||
@ -80,7 +80,7 @@
|
||||
</Reference>
|
||||
<Reference Include="RecrownedAthenaeum, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\References\RecrownedAthenaeum\RecrownedAthenaeum.dll</HintPath>
|
||||
<HintPath>..\References\RecrownedAthenaeum.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Xml" />
|
||||
|
@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// This is the main type for your game.
|
||||
@ -61,6 +62,7 @@ namespace RecrownedAthenaeum
|
||||
Resolution resolution = preferencesManager.GetPreferences<General>().Resolution;
|
||||
graphics.PreferredBackBufferWidth = resolution.Width;
|
||||
graphics.PreferredBackBufferHeight = resolution.Height;
|
||||
RecrownedAthenaeum.Configuration.graphicsDeviceManager = graphics;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -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<Texture2D>("RhythmBullet"), 0.7f);
|
||||
@ -113,21 +115,21 @@ namespace RecrownedAthenaeum
|
||||
/// <param name="gameTime">Provides a snapshot of timing values.</param>
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user