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.

27 lines
625 B

2 years ago
using System;
using static flecs_hub.flecs;
using static flecs_hub.flecs.Runtime;
2 years ago
namespace gaemstone.ECS;
public unsafe partial class Universe
{
public ecs_world_t* Handle { get; }
public Universe(params string[] args)
2 years ago
{
var argv = CStrings.CStringArray(args);
Handle = ecs_init_w_args(args.Length, argv);
CStrings.FreeCStrings(argv, args.Length);
2 years ago
RegisterBuiltInLookups();
this.RegisterEntity<Game>();
this.RegisterComponent<Module>();
2 years ago
}
public bool Progress(TimeSpan delta)
=> ecs_progress(this, (float)delta.TotalSeconds);
2 years ago
public static implicit operator ecs_world_t*(Universe w) => w.Handle;
}