ECS
Module: ecs
Table of Contents
Constructor
ECS
()
Methods
cleanDirtyEntities
()
"Clean" entities flagged as dirty by removing unecessary systems and adding missing systems.
Remove an entity from the ecs by reference.
Parameters:
-
entity
Entityreference of the entity to remove
Returns:
Entity:
the remove entity if any
Remove an entity from the ecs by entity id.
Parameters:
-
entityId
Entityid of the entity to remove
Returns:
Entity:
removed entity if any
removeEntityIfDirty
(
-
entity
Remove an entity from dirty entities by reference.
Parameters:
-
entity
typeentity to remove
update
()
Update the ecs.
Properties
entities
Array
Store all entities of the ECS.
entitiesSystemsDirty
Array
Store entities which need to be tested at beginning of next tick.
systems
Array
Store all systems of the ECS.
updateCounter
Number
Count how many updates have been done.