MoonTools.ECS/src/IndexableSetState.cs

20 lines
416 B
C#

using System.Collections.Generic;
using System.Runtime.InteropServices;
namespace MoonTools.ECS
{
public class IndexableSetState<T> where T : unmanaged
{
public int Count;
public Dictionary<T, int> Indices;
public byte[] Array;
public unsafe IndexableSetState(int count)
{
Count = count;
Indices = new Dictionary<T, int>(count);
Array = new byte[sizeof(T) * count];
}
}
}