Skip to content
Jason El-Massih edited this page Jan 27, 2016 · 3 revisions

To prevent extensive calling across subsystems, a game event system is used to communicate between subsystems.

Events are created by inheriting BaseEventData, adding any additional data, serialization, or copy logic required by the event. All events also need an EventType field defined with a GUID to be uniquely identified across the application.

To define callbacks for specific events, Bombast Engine uses the fastdelegate library. This allows a method to be bound to an existing event with the following code (In this example GameSampleLogic::StartMoveUpDelegate() will be called when the EvtData_StartUp event is emitted):

pEventManager->VAddListener(fastdelegate::MakeDelegate(this, &GameSampleLogic::StartMoveUpDelegate), EvtData_StartUp::sEventType);

Clone this wiki locally