-added more documentation

-remove update() function from entity
-currently max supported components count is 64 per type
This commit is contained in:
Mergul 2020-03-21 13:27:14 +01:00
parent 546b73c567
commit 845f468d59
10 changed files with 199 additions and 64 deletions

View file

@ -1,8 +1,21 @@
/************************************************************************************************************************
*This module contain attributes used to mark components.
*Currently only two attributes are supported:
* - optional: mark component as optional for system update
* - readonly: mark component access as read only (used for multithreading)
*
*By default components are required and mutable. "const" attribute can be used insteac od readonly mark.
*ex.
*Struct EntitiesData
*{
* Comp1[] cmp; //mutable required component
* @readonly @optional Comp2[] cmp2; //optional read only component
* @optional const (Comp3)[] cmp3; //same as cmp2
*}
*/
module ecs.attributes;
///Used to mark optional components for system.
enum optional = "optional";
//Used to mark components excluded from update for system. Enum 'ExcludedComponents' should be used instead of it.
//enum excluded = "excluded";
///Used to mark readonly components for system. "const" can be used insted.
enum readonly = "readonly";