Hello forum : )
I was wondering if I should use my event-listener for an information exchange.
Let's look at the level-module, having the level information, and the Lua-module, having Lua loaded.
How should communication be?
A few ideas of mine:
Do not use the event listener: Composition
This would mean that the Level-module owns a Lua-class that it can use.
I dislike this because there will be multiple modules needing a Lua-class.
So instead of having many Lua-instances, one could do them all well.
Use it: Intensive Event-Triggering
My Level-module triggers a load-game-event to which the Lua-module listens.
Upon triggering, the Lua-modules triggers a loaded-game-information on which the
Level-module would trigger.
Feels awkward to make this communication like this, but maybe it is normal?
Now, what is your suggestion?
Thanks for reading : )