Cleaned dependencies and project up. I don't actually know.

This commit is contained in:
Harrison Deng 2019-11-23 21:47:21 -05:00
parent 08f45bcfd4
commit c04f2f1b78
5 changed files with 25 additions and 13 deletions

View File

@ -3,7 +3,6 @@
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" PrivateAssets="All"/>
<PackageReference Include="MonoGame.Framework.Content.Pipeline.Portable" Version="3.7.1.189" PrivateAssets="All"/> <PackageReference Include="MonoGame.Framework.Content.Pipeline.Portable" Version="3.7.1.189" PrivateAssets="All"/>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -18,7 +18,7 @@ namespace RecrownedAthenaeum.ContentSystem
/// <summary> /// <summary>
/// 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. /// 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.
/// </summary> /// </summary>
public readonly Dictionary<Type, IContentPathResolver> contentPathModifier; private readonly Dictionary<Type, IContentPathResolver> contentPathModifier;
/// <summary> /// <summary>
/// Used when no path modifier is defined for that specific type. /// Used when no path modifier is defined for that specific type.
/// </summary> /// </summary>
@ -47,7 +47,21 @@ namespace RecrownedAthenaeum.ContentSystem
queue = new Queue<ContentData>(); queue = new Queue<ContentData>();
contentPathModifier = new Dictionary<Type, IContentPathResolver>(); contentPathModifier = new Dictionary<Type, IContentPathResolver>();
} }
/// <summary>
/// Adds a <see cref="IContentPathResolver"/> to this handler.
/// </summary>
/// <param name="assetType"></param>
/// <param name="contentResolver"></param>
public void AddContentPathResolver(Type assetType, IContentPathResolver contentResolver) {
contentPathModifier.Add(assetType, contentResolver);
}
/// <summary>
/// Removes the <see cref="IContentPathResolver"/> for the key.
/// </summary>
/// <param name="assetType"></param>
public void RemoveContentResolver(Type assetType) {
contentPathModifier.Remove(assetType);
}
private void Load(string assetName, Type type, bool usePathModifier) private void Load(string assetName, Type type, bool usePathModifier)
{ {
Debug.WriteLine("Loading asset: " + assetName); Debug.WriteLine("Loading asset: " + assetName);
@ -179,6 +193,5 @@ namespace RecrownedAthenaeum.ContentSystem
} }
} }
} }
} }

View File

@ -3,7 +3,7 @@
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" PrivateAssets="All"/> <PackageReference Include="Newtonsoft.Json" Version="12.0.3"/>
<PackageReference Include="MonoGame.Framework.Portable" Version="3.6.0.1625" PrivateAssets="All"/> <PackageReference Include="MonoGame.Framework.Portable" Version="3.6.0.1625" PrivateAssets="All"/>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -158,11 +158,13 @@ namespace RecrownedAthenaeum.UI.ScreenSystem
{ {
if (resizing) throw new InvalidOperationException("Already resizing."); if (resizing) throw new InvalidOperationException("Already resizing.");
resizing = true; resizing = true;
if (Screen != null) {
Screen.AssetLoadStateChange(false); Screen.AssetLoadStateChange(false);
Screen = loadingScreen; Screen = loadingScreen;
previousScreenRenderTarget.Dispose(); previousScreenRenderTarget.Dispose();
previousScreenRenderTarget = null; previousScreenRenderTarget = null;
} }
}
/// <summary> /// <summary>
/// Notifies all screen that assets have completed being loaded after a resize. /// Notifies all screen that assets have completed being loaded after a resize.

View File

@ -24,11 +24,9 @@ namespace RecrownedAthenaeum.UI.SkinSystem
{ {
get get
{ {
try if (mainSkin.CursorTexture != null) {
{
return mainSkin.CursorTexture; return mainSkin.CursorTexture;
} catch (NullReferenceException) } else {
{
return alternateSkin.CursorTexture; return alternateSkin.CursorTexture;
} }
} }