clean up.

This commit is contained in:
Harrison Deng 2018-10-29 00:33:26 -05:00
parent 8d762c7841
commit 3a4dfb94ac
5 changed files with 9 additions and 8 deletions

View File

@ -65,7 +65,7 @@
<Compile Include="Zer01HD\Game\Preferences\Controls.cs" />
<Compile Include="Zer01HD\Game\Preferences\General.cs" />
<Compile Include="Zer01HD\Utilities\Persistence\PreferencesManager.cs" />
<Compile Include="Zer01HD\Utilities\Resolution.cs" />
<Compile Include="Zer01HD\Utilities\DataTypes\Resolution.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="BulletSharp, Version=0.11.0.0, Culture=neutral, processorArchitecture=MSIL">

View File

@ -1,6 +1,7 @@
using RhythmBullet.Zer01HD.Game.Preferences;
using RhythmBullet.Zer01HD.Utilities;
using RhythmBullet.Zer01HD.Utilities.ContentSystem;
using RhythmBullet.Zer01HD.Utilities.DataTypes;
using System;
using System.Collections.Generic;
using System.Linq;

View File

@ -6,12 +6,12 @@ using System.Threading.Tasks;
namespace RhythmBullet.Zer01HD.Utilities.ContentSystem
{
class ContentLoad
class LoadableContent
{
internal Type type;
internal string assetName;
public ContentLoad(string assetName, Type type)
public LoadableContent(string assetName, Type type)
{
this.type = type;
this.assetName = assetName;

View File

@ -14,7 +14,7 @@ namespace RhythmBullet.Zer01HD.Utilities.ContentSystem
volatile bool queued;
Thread thread;
readonly ContentManager contentManager;
readonly Queue<ContentLoad> queue;
readonly Queue<LoadableContent> queue;
Dictionary<string, IDisposable> assets;
public readonly Dictionary<Type, IContentResolver> contentResolver;
@ -22,7 +22,7 @@ namespace RhythmBullet.Zer01HD.Utilities.ContentSystem
{
this.contentManager = contentManager;
assets = new Dictionary<string, IDisposable>();
queue = new Queue<ContentLoad>();
queue = new Queue<LoadableContent>();
contentResolver = new Dictionary<Type, IContentResolver>();
}
@ -39,7 +39,7 @@ namespace RhythmBullet.Zer01HD.Utilities.ContentSystem
{
lock (queue)
{
ContentLoad content = queue.Dequeue();
LoadableContent content = queue.Dequeue();
Load(content.assetName, content.type);
}
queued = false;
@ -61,7 +61,7 @@ namespace RhythmBullet.Zer01HD.Utilities.ContentSystem
{
if (!assets.ContainsKey(assetName))
{
queue.Enqueue(new ContentLoad(assetName, type));
queue.Enqueue(new LoadableContent(assetName, type));
}
}
}

View File

@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RhythmBullet.Zer01HD.Game.Preferences
namespace RhythmBullet.Zer01HD.Utilities.DataTypes
{
public class Resolution : IComparable<Resolution>
{