You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
598 B
23 lines
598 B
using System.Runtime.InteropServices; |
|
using gaemstone.ECS; |
|
using gaemstone.ECS.Utility; |
|
using static flecs_hub.flecs; |
|
|
|
namespace gaemstone.Flecs.Systems; |
|
|
|
[BuiltIn, Module, Path("/flecs/monitor")] |
|
public unsafe partial class Monitor |
|
: IModuleInitializer |
|
{ |
|
public static void Initialize<T>(Entity<T> module) |
|
{ |
|
using var alloc = TempAllocator.Use(); |
|
ecs_import_c(module.World, |
|
new() { Data = new() { Pointer = &MonitorImport } }, |
|
alloc.AllocateCString("FlecsMonitor")); |
|
} |
|
|
|
[UnmanagedCallersOnly] |
|
private static void MonitorImport(ecs_world_t* world) |
|
=> FlecsMonitorImport(world); |
|
}
|
|
|