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.
31 lines
735 B
31 lines
735 B
using gaemstone.ECS; |
|
|
|
namespace gaemstone; |
|
|
|
public class Universe<TContext> |
|
{ |
|
public World<TContext> World { get; } |
|
public ModuleManager<TContext> Modules { get; } |
|
|
|
public Universe() |
|
{ |
|
World = new(minimal: true); |
|
Modules = new(this); |
|
|
|
// Bootstrap [Relation] tag, since it will be added to some Flecs types. |
|
World.New("/gaemstone/Doc/Relation").Build() |
|
.CreateLookup<Doc.Relation>(); |
|
|
|
// Bootstrap core module from Flecs. |
|
Modules.Import<flecs.core>(); |
|
|
|
// Import addon modules from Flecs we use for the engine. |
|
Modules.Import<flecs.system>(); |
|
Modules.Import<flecs.pipeline>(); |
|
Modules.Import<flecs.meta>(); |
|
Modules.Import<flecs.doc>(); |
|
Modules.Import<flecs.coredoc>(); |
|
|
|
Modules.Register<Doc>(); |
|
} |
|
}
|
|
|