Move ECS to Bubel module
This commit is contained in:
parent
a7a63f6a20
commit
5411e97cb1
46 changed files with 163 additions and 154 deletions
28
source/bubel/ecs/attributes.d
Normal file
28
source/bubel/ecs/attributes.d
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/************************************************************************************************************************
|
||||
This module contain attributes used to mark components.
|
||||
Currently only two attributes are supported:
|
||||
$(LIST
|
||||
* 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.
|
||||
|
||||
---
|
||||
Struct EntitiesData
|
||||
{
|
||||
Comp1[] cmp; //mutable required component
|
||||
@readonly @optional Comp2[] cmp2; //optional read only component
|
||||
@optional const (Comp3)[] cmp3; //same as cmp2
|
||||
}
|
||||
---
|
||||
|
||||
Copyright: Copyright © 2018-2019, Dawid Masiukiewicz, Michał Masiukiewicz
|
||||
License: BSD 3-clause, see LICENSE file in project root folder.
|
||||
*/
|
||||
module bubel.ecs.attributes;
|
||||
|
||||
///Used to mark optional components for system.
|
||||
enum optional = "optional";
|
||||
///Used to mark readonly components for system. "const" can be used insted.
|
||||
enum readonly = "readonly";
|
||||
Loading…
Add table
Add a link
Reference in a new issue