mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
Better asset processor selection, process subassets
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections;
|
||||
using GlitchyEngine.Math;
|
||||
using GlitchyEngine.Renderer;
|
||||
using System.Threading;
|
||||
|
||||
namespace GlitchyEngine.Content;
|
||||
|
||||
class SpriteLoader : IProcessedAssetLoader
|
||||
{
|
||||
public Result<Asset> Load(Stream dataStream)
|
||||
{
|
||||
AssetHandle textureHandle = Try!(dataStream.Read<AssetHandle>());
|
||||
float4 textureCoordinates = Try!(dataStream.Read<float4>());
|
||||
|
||||
return new Sprite(textureHandle, textureCoordinates);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user