Game event handler

I am trying to find a ‘clean’ way to create an event handler in my game. I have been looking for sample code that does this. I have used this in traditional languages such as C/C++ with callbacks.

Essentially, I would want the event handler to trigger everything that changes in the game using events. Each object would ‘subscribe’ to certain events and update themselves accordingly.

I haven’t been able to find any sample code of this in Panda3d. I am a bit unfamiliar with Python too which doesn’t help. I know Panda has a default event handler but I was unsure how useful this was.

Panda has a built in task manager, which works very well.

panda3d.org/manual/index.php … t_Handling