freezedev / lyria

Lightweight DOM-based game framework
The Unlicense
9 stars 0 forks source link

Events in scene are being registered twice #31

Closed frostney closed 10 years ago

frostney commented 11 years ago

Test case: Create an eventmap scene event to be called at scene switch, the event is being called twice.

frostney commented 10 years ago

Found the source of the bug: The event map (and more importantly its event data) binds to Scene.prototype and will subsequently trigger in all scenes. The more scenes there are, the more often the events get triggered.