How to get EntityBehaviour objects to listen for global events?
Options
Gamieon
✭
in Photon Bolt
I'm using global events because they're reliable and I would like certain objects derived from EntityBehavior to execute code when they're raised.
I've tried adding the event interface to the class, and I also tried calling entity.AddEventCallback(MyHandler); but MyHandler never gets called when the event is fired. FWIW I'm running as the server and no clients are connected.
I've tried adding the event interface to the class, and I also tried calling entity.AddEventCallback(MyHandler); but MyHandler never gets called when the event is fired. FWIW I'm running as the server and no clients are connected.
0
Comments
-
You cannot do that, but you can have a globaleventlistener on the object that calls functions on the EntityBehaviour for example.
0