Interface System

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
});
}
}
interface System {
    onCreate?(): void;
    onDestroy?(): void;
    onDisabled?(): void;
    onEnabled?(): void;
    onUpdate(): void;
}

Implemented by

Methods