lucaspoffo / renet

Server/Client network library for multiplayer games with authentication and connection management made with Rust
Apache License 2.0
662 stars 68 forks source link

Add client events #95

Closed Shatur closed 1 year ago

Shatur commented 1 year ago

I added events to react on connection or disconnection. Useful if you want to close your "connecting to server" message or display "disconnected from server" error on such event. Closes #94. I used separate structs instead of enum to make it play nicely with run_if(on_event::<T>()).

Shatur commented 1 year ago

After thinking about it more, I think we should go with a different approach because of #59. I think we need to just add two more conditions.