mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
20 lines
459 B
Beef
20 lines
459 B
Beef
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);
|
|
}
|
|
}
|