This interface is used for the creation of system classes. You will have to inject the dependencies you need manully.
class PlayerSystem implements System { @inject(Symbols.EntityManager) private readonly entityManager: EntityManager; public onUpdate() { this.entityManager.search(Player).forEach(({component, entity}) => { // do somethng }); }} Copy
class PlayerSystem implements System { @inject(Symbols.EntityManager) private readonly entityManager: EntityManager; public onUpdate() { this.entityManager.search(Player).forEach(({component, entity}) => { // do somethng }); }}
Optional
This method is called the first time the system is enabled
This method is called when the system is destroyed
This method is called when the system is disabled
This method is called when the system is enabled
This method is called once every frame
This interface is used for the creation of system classes. You will have to inject the dependencies you need manully.
Example