This module contain main helper templates for user.
There are three structure templates (mixins) which can be added on top of structure:
System: make system structure
Component: make component structure
Event: make event structure
This mixins are optional and are used to adding some additional capabilities, e.g. ECS.System is used to configuring default number of jobs for system.
StructSystem1
{
mixin!ECS.System;
}
StructSystem2
{
mixin!ECS.System(16);//set number of jobs generated for system by multithreaded update
}
StructComponent1
{
mixin!ECS.Component;
}
StructEvent1
{
mixin!ECS.Event;
}
There is also template for generating list of excluded components "ExcludedComponets(T...)".
This template takes component structure types and making list of excluded components used in "registerSystem" function.
Templates ReadOnlyDependencies nad WritableDependencies are used to create list of dependencies for System.
Writable dependencies are bloking parallel execution of system which has same dependency (as writable or readonly).
This dependencies works same as Component dependencies but can be used for creating external dependencies (e.g. dependency on spatial partitioning tree access).
This module contain main helper templates for user. There are three structure templates (mixins) which can be added on top of structure:
This mixins are optional and are used to adding some additional capabilities, e.g. ECS.System is used to configuring default number of jobs for system.
There is also template for generating list of excluded components "ExcludedComponets(T...)". This template takes component structure types and making list of excluded components used in "registerSystem" function.
Templates ReadOnlyDependencies nad WritableDependencies are used to create list of dependencies for System. Writable dependencies are bloking parallel execution of system which has same dependency (as writable or readonly). This dependencies works same as Component dependencies but can be used for creating external dependencies (e.g. dependency on spatial partitioning tree access).