Sigma icon indicating copy to clipboard operation
Sigma copied to clipboard

Add and use a Composite system insted of populating composites in main.cpp

Open catageek opened this issue 12 years ago • 2 comments

Composite System has the role to:

  • register factories of systems (previously done in main.cpp)
  • add composites to entities in ECS, wrapping the factory functions
  • remove composites and dependent children from entities in ECS
  • store and maintain a set of composites and their associated entities under the form of a bitset
  • store the dependency hierarchy of composites that declared a dependency at build time

A big change is that addition and removal of composites are asynchronous, i.e they are queued until the Update() function is called.

Note that Entity System still use the synchronous functions provided by FactorySystem since it stores the returned object. A fix is in progress.

Unit tests will be provided as soon as the issue on include path is fixed.

catageek avatar Jan 26 '14 11:01 catageek

Subscriber is misspelled in the file name.

adam4813 avatar Jan 26 '14 12:01 adam4813

Included in #156, but left here for clarity

catageek avatar Feb 02 '14 22:02 catageek