Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add event manager #5

Open
hak33m16 opened this issue Feb 26, 2022 · 0 comments
Open

Add event manager #5

hak33m16 opened this issue Feb 26, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@hak33m16
Copy link
Owner

hak33m16 commented Feb 26, 2022

Add an event manager with subscriber-receiver model as seen in entityx. Add base Event object

EventManager class should have:

  • subscribe method that allows users to subscribe a function to a particular event
  • emit method that allows users to emit events of any type

Only problem with the idea of subscribe method being something like:
subscribe<T extends Event>(event: T, handler: Function)
Is the whole binding issue in JS when it comes to classes. Idk if this is solved with ES6? e.g. https://github.com/hak33m16/ladder/blob/master/src/systems/RenderSystem.js#L44

@hak33m16 hak33m16 added the enhancement New feature or request label Feb 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant