All event emitters must have as first parameter the object which call the event. For example, in scene.onAddedEntity the params must be Scene->Entity->Void.
This is a good way to know who call the event, because haxe don't save the initial context. The user can use bind and custom functions to pass some info but this is annoying. So for me, it's better use this nomenclature as "standard" for events.
All event emitters must have as first parameter the object which call the event. For example, in scene.onAddedEntity the params must be Scene->Entity->Void.
This is a good way to know who call the event, because haxe don't save the initial context. The user can use bind and custom functions to pass some info but this is annoying. So for me, it's better use this nomenclature as "standard" for events.