-
Notifications
You must be signed in to change notification settings - Fork 28
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
Use single event system for client events #259
Conversation
I think we probably should make the API nicer by using two functions. First function will read the resource from the registry by ID (like you tried to do before, like Bevy does for updates), iterates over all events and passes each event into a second function with the correct type. And let user to override only the second function. I suspect that Also instead of passing the world, we probably should pass a context struct like we do for components. This context will contain the current tick and |
I'm not sure I fully understand, but doing that we need to store the
The
I'm not get this, can you elaborate more? |
I think that you can store it in the struct with functions. The idea behind it is to provide a nice API for users. Functions customization needed only to provide serialization/deserialization for events that doesn't have
Maybe we can unite pop_from_queue and receive? I think it will be possible with the mentioned two-functions approach.
Sure! Right now we pass
|
Superseded by #262. |
Fix #245