Ybalrid / Annwvyn

Annwvyn C++ Open Source designed-for-VR game engine and application developement framework
MIT License
41 stars 7 forks source link

Permit to extend the event system with custom event firered by a "userspace subsystem" #68

Closed Ybalrid closed 7 years ago

Ybalrid commented 7 years ago

The event system is built upon an "EventManager" class that is owned by the engine, and and a bunch of "EventListener" that implement an observer design-pattern.

Currently the kind of events than can be sent/received by this system is fixed by what-even code is in the AnnEventManager and AnnEventListener classes.

The idea is to use multiple inheritance to make custom event listener classes. The user defined subsystem will have a special hook to add some code to the event updating that will get piped to "custom" event listeners.

This will permit to integrate more nicely with subsystems that are implementing novelty hardware (leap motion controllers...) or interfacing special kind of software (AI, GamePlatform integration, Networking...)