Small ResourceManager refactor, add ResourceSaver<T>.

This commit is contained in:
2024-01-21 20:24:53 +01:00
parent cfec5a59b1
commit 62e0e013f1
16 changed files with 215 additions and 54 deletions

View File

@@ -1,15 +1,13 @@
namespace DaggerFramework.Resources;
public class FontLoader : IResourceLoader
public class FontLoader : IResourceLoader<Font>
{
public IEnumerable<string> SupportedExtensions => new string[]
{
"ttf"
};
public Type ResourceType => typeof(Font);
public Resource Load(string path)
public Font Load(string path)
{
byte[] fileBuffer = File.ReadAllBytes(path);
var result = new Font(path, fileBuffer);