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>
</PropertyGroup>
<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"/>
</ItemGroup>
<ItemGroup>

View File

@ -18,7 +18,7 @@ namespace RecrownedAthenaeum.ContentSystem
/// <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.
/// </summary>
public readonly Dictionary<Type, IContentPathResolver> contentPathModifier;
private readonly Dictionary<Type, IContentPathResolver> contentPathModifier;
/// <summary>
/// Used when no path modifier is defined for that specific type.
/// </summary>
@ -47,7 +47,21 @@ namespace RecrownedAthenaeum.ContentSystem
queue = new Queue<ContentData>();
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)
{
Debug.WriteLine("Loading asset: " + assetName);
@ -179,6 +193,5 @@ namespace RecrownedAthenaeum.ContentSystem
}
}
}
}

View File

@ -3,7 +3,7 @@
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<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"/>
</ItemGroup>
</Project>

View File

@ -158,10 +158,12 @@ namespace RecrownedAthenaeum.UI.ScreenSystem
{
if (resizing) throw new InvalidOperationException("Already resizing.");
resizing = true;
Screen.AssetLoadStateChange(false);
Screen = loadingScreen;
previousScreenRenderTarget.Dispose();
previousScreenRenderTarget = null;
if (Screen != null) {
Screen.AssetLoadStateChange(false);
Screen = loadingScreen;
previousScreenRenderTarget.Dispose();
previousScreenRenderTarget = null;
}
}
/// <summary>

View File

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