Closed jordillonch closed 8 years ago
What do you mean events bring some parameters? Could you give me an example and let me know why you need this?
I mean to carry some data with the event. For example I am thinking in an event like "join player" and I would like to get the "player id" from the event.
I think you can put this kind of parameters in Context object, which means fire an event like "JOIN_PLAYER" with context "player_id".
Yes but I want to use the context as a game state as it is done in your snake example.
Then you can compose a game state and the parameter as the Context object.
Yes, I see. But I think may be it's more clear to put data related with the event in the same even. Anyway, thanks for your answers 😀
Is there some way of use events that bring some parameters? All examples that I found in the code are just events that are enums. Thanks!