From 019b955577fc83626213415715ef76a674044b49 Mon Sep 17 00:00:00 2001 From: Harrison Deng Date: Sun, 20 Jan 2019 01:31:01 -0600 Subject: [PATCH] refactored. --- .../ContentSystem/{ContentLoad.cs => ContentData.cs} | 4 ++-- .../ContentSystem/ContentManagerController.cs | 8 ++++---- RecrownedAthenaeum/RecrownedAthenaeum.csproj | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) rename RecrownedAthenaeum/ContentSystem/{ContentLoad.cs => ContentData.cs} (74%) diff --git a/RecrownedAthenaeum/ContentSystem/ContentLoad.cs b/RecrownedAthenaeum/ContentSystem/ContentData.cs similarity index 74% rename from RecrownedAthenaeum/ContentSystem/ContentLoad.cs rename to RecrownedAthenaeum/ContentSystem/ContentData.cs index 81be54c..2d32c20 100644 --- a/RecrownedAthenaeum/ContentSystem/ContentLoad.cs +++ b/RecrownedAthenaeum/ContentSystem/ContentData.cs @@ -2,13 +2,13 @@ namespace RecrownedAthenaeum.ContentSystem { - struct LoadableContent + struct ContentData { internal Type type; internal string assetName; internal bool usePathModifier; - public LoadableContent(string assetName, Type type, bool usePathModifier) + public ContentData(string assetName, Type type, bool usePathModifier) { this.type = type; this.assetName = assetName; diff --git a/RecrownedAthenaeum/ContentSystem/ContentManagerController.cs b/RecrownedAthenaeum/ContentSystem/ContentManagerController.cs index ab4bc01..8ef5fd2 100644 --- a/RecrownedAthenaeum/ContentSystem/ContentManagerController.cs +++ b/RecrownedAthenaeum/ContentSystem/ContentManagerController.cs @@ -13,7 +13,7 @@ namespace RecrownedAthenaeum.ContentSystem { Thread thread; readonly ContentManager contentManager; - readonly Queue queue; + readonly Queue queue; Dictionary assets; /// /// Path modifiers to change the path in which the content manager looks to load a file. Used for better organizing things while not needing to type entire path. @@ -40,7 +40,7 @@ namespace RecrownedAthenaeum.ContentSystem { this.contentManager = contentManager; assets = new Dictionary(); - queue = new Queue(); + queue = new Queue(); contentPathModifier = new Dictionary(); } @@ -84,7 +84,7 @@ namespace RecrownedAthenaeum.ContentSystem { if (!assets.ContainsKey(assetName)) { - queue.Enqueue(new LoadableContent(assetName, typeof(T), usePathModifier)); + queue.Enqueue(new ContentData(assetName, typeof(T), usePathModifier)); Debug.WriteLine("Queued asset: " + assetName); } else @@ -115,7 +115,7 @@ namespace RecrownedAthenaeum.ContentSystem { lock (queue) { - LoadableContent content = queue.Dequeue(); + ContentData content = queue.Dequeue(); Load(content.assetName, content.type, content.usePathModifier); tasksCompleted++; progress = (float)tasksCompleted / totalTasks; diff --git a/RecrownedAthenaeum/RecrownedAthenaeum.csproj b/RecrownedAthenaeum/RecrownedAthenaeum.csproj index d48bb21..c6dcd33 100644 --- a/RecrownedAthenaeum/RecrownedAthenaeum.csproj +++ b/RecrownedAthenaeum/RecrownedAthenaeum.csproj @@ -52,7 +52,7 @@ - +