DoopelPonger
|
Orchestrates the publishing, receiving, registering and deregistering events and even listeners. More...
Public Member Functions | |
delegate void | EventListener (EventType type, EventParameters parameter) |
The type of function that can be notified when an EventType is fired. More... | |
void | Awake () |
Initialize the data structures needed to keep track of listeners and publishers of events. More... | |
void | FixedUpdate () |
Iterate through the queue of registration actions that need to modify the list of listeners. More... | |
void | DeregisterListener (EventType eventType, EventListener eventListener) |
Puts an item in the modification queue to revmove the event listener from the event type list on the next fixed update. More... | |
void | DeregisterListenerImmediate (EventType eventType, EventListener eventListener) |
Remove the eventListener from the list immediately. More... | |
void | RegisterListener (EventType eventType, EventListener eventListener) |
Puts an item in the modification queue to add the event listener from the event type list on the next fixed update. More... | |
void | RegisterListenerImmediate (EventType eventType, EventListener eventListener) |
Add the eventListener from the list immediately. More... | |
void | PublishEvent (EventType eventType, EventParameters parameters) |
Send the EventParameters to all listeners of the EventType. More... | |
Orchestrates the publishing, receiving, registering and deregistering events and even listeners.
|
strong |
The types of notifications that can be sent to other components to communicate when special things happen.
void EventManager.Awake | ( | ) |
Initialize the data structures needed to keep track of listeners and publishers of events.
void EventManager.DeregisterListener | ( | EventType | eventType, |
EventListener | eventListener | ||
) |
Puts an item in the modification queue to revmove the event listener from the event type list on the next fixed update.
eventType | The EventType that should have the eventListener removed. |
eventListener | The callback function that should be removed. |
void EventManager.DeregisterListenerImmediate | ( | EventType | eventType, |
EventListener | eventListener | ||
) |
Remove the eventListener from the list immediately.
eventType | The EventType that should have the eventListener removed. |
eventListener | The callback function that should be removed. |
delegate void EventManager.EventListener | ( | EventType | type, |
EventParameters | parameter | ||
) |
The type of function that can be notified when an EventType is fired.
void EventManager.FixedUpdate | ( | ) |
Iterate through the queue of registration actions that need to modify the list of listeners.
void EventManager.PublishEvent | ( | EventType | eventType, |
EventParameters | parameters | ||
) |
Send the EventParameters to all listeners of the EventType.
eventType | The EventType that should be notified. |
parameters | The custom data to be forwarded along to all listeners of the eventType. |
void EventManager.RegisterListener | ( | EventType | eventType, |
EventListener | eventListener | ||
) |
Puts an item in the modification queue to add the event listener from the event type list on the next fixed update.
eventType | The EventType that should have the eventListener added. |
eventListener | The callback function that should be added. |
void EventManager.RegisterListenerImmediate | ( | EventType | eventType, |
EventListener | eventListener | ||
) |
Add the eventListener from the list immediately.
eventType | The EventType that should have the eventListener added. |
eventListener | The callback function that should be added. |