OdinAI
 All Classes Namespaces Functions Variables
OdinAI::EventManager Class Reference

#include <EventManager.h>

Public Member Functions

void AddEventListener (const char *eventName, EventCallback callBackfunction)
 
void FireEvent (std::shared_ptr< Event > event, uint delay=0)
 
void Update ()
 
void Release ()
 

Detailed Description

Event manager class manages events that are fired by different sub systems.

Member Function Documentation

void OdinAI::EventManager::AddEventListener ( const char *  eventName,
EventCallback  callBackfunction 
)

Binds a callback function with a specific event.

Parameters
eventNameThe name of the event
callbackPoints to a callback function, which is called when the specific event fired.
void OdinAI::EventManager::FireEvent ( std::shared_ptr< Event event,
uint  delay = 0 
)

Fire an event.

Parameters
eventThe event object that are sent to all listeners
delayWait delay ms before sending out the event
void OdinAI::EventManager::Release ( )

Release all dynamic memory.

void OdinAI::EventManager::Update ( )

Update the event manager, note it should only be done once.


The documentation for this class was generated from the following file: