Cleaned up asset loading system, and made progress on game engine structure.

This commit is contained in:
2020-05-18 14:07:25 -05:00
parent 8e2510903f
commit 635ed9fb7d
11 changed files with 90 additions and 33 deletions

View File

@@ -1,9 +1,12 @@
using System;
namespace RecrownedGTK.AssetsSystem.Information {
/// <summary>
/// Describes a serializable datatype.
/// Meant for use as a part of the asset pipeline.
/// </summary>
public interface IInfo
{
Type type {get;}
IDisposable CreateUseable();
}
}

View File

@@ -0,0 +1,12 @@
using System;
namespace RecrownedGTK.AssetsSystem.Information {
/// <summary>
/// An interface that describes an information class.
/// An information class is class that can produce a useable asset object.
/// In the asset pipeline, this is the second step, after loading the asset data.
/// </summary>
public interface IInformation
{
}
}

View File

@@ -5,7 +5,7 @@ namespace RecrownedGTK.AssetsSystem.Information {
public struct TextureInfo : IInfo {
public readonly byte[] textureData;
int width, height;
public Type type => typeof(TextureData);
public Type resultingType => typeof(TextureData);
public TextureInfo(int width, int height, byte[] textureData) {
this.width = width;
this.height = height;