Nazariglez / Gecko2D

Cross-platform Game Framework
https://nazariglez.github.io/Gecko2D
MIT License
50 stars 7 forks source link

Normalize events parameters #63

Closed Nazariglez closed 6 years ago

Nazariglez commented 6 years ago

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.

Nazariglez commented 6 years ago

I'll close this, only using the engine in a real project we can be sure of this change.