SystemRegistryTrait
Table of Contents
Properties
- $bindedSystems : array<string|int, SystemInterface>
- Array of binded systems
Methods
- bindSystem() : void
- Binds a system to the registry
- bindSystems() : void
- Binds multiple systems to the registry
- registerSystems() : void
- Registers all binded systems to the entity registry
- unregisterSystems() : void
- Unregisters all binded systems from the entity registry
Properties
$bindedSystems
Array of binded systems
protected
array<string|int, SystemInterface>
$bindedSystems
= []
Methods
bindSystem()
Binds a system to the registry
public
bindSystem(SystemInterface $system) : void
Will check if the system is already binded before adding it.
Parameters
- $system : SystemInterface
bindSystems()
Binds multiple systems to the registry
public
bindSystems(array<string|int, SystemInterface> $systems) : void
Parameters
- $systems : array<string|int, SystemInterface>
registerSystems()
Registers all binded systems to the entity registry
public
registerSystems(EntitiesInterface $entities) : void
Parameters
- $entities : EntitiesInterface
unregisterSystems()
Unregisters all binded systems from the entity registry
public
unregisterSystems(EntitiesInterface $entities) : void
Parameters
- $entities : EntitiesInterface