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.
 
 

33 lines
970 B

using gaemstone.ECS;
namespace gaemstone;
public class Universe : World
{
public ModuleManager Modules { get; }
public Universe(params string[] args)
: base(args)
{
Modules = new(this);
// Bootstrap [Relation] tag, since it will be added to some Flecs types.
New("/gaemstone/Doc/Relation").Build().CreateLookup<Doc.Relation>();
// Bootstrap built-in (static) modules from Flecs.
// These methods are generated by gaemstone.SourceGen.
Flecs.Core .RegisterComponents(this);
Flecs.DeletionEvent .RegisterComponents(this);
Flecs.DeletionBehavior.RegisterComponents(this);
Flecs.Doc .RegisterComponents(this);
Flecs.ObserverEvent .RegisterComponents(this);
Flecs.Pipeline .RegisterComponents(this);
Flecs.SystemPhase .RegisterComponents(this);
Modules.Register<Doc>();
// Create "Game" entity to store global state.
New("/Game").Symbol("Game").Build()
.CreateLookup<Game>().Add<Game>();
}
}