Small ResourceManager refactor, add ResourceSaver<T>.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user