Click or drag to resize
EventManager Class
Allows listeners to register for game-related events and notifies them whenever one of these events is fired.
Inheritance Hierarchy
SystemObject
  Slash.ECS.EventsEventManager

Namespace: Slash.ECS.Events
Assembly: Slash.ECS (in Slash.ECS.dll) Version: 1.0.6018.40178
Syntax
public class EventManager

The EventManager type exposes the following members.

Constructors
  NameDescription
Public methodEventManager
Constructs a new event manager with an empty event queue and without any listeners.
Top
Properties
  NameDescription
Public propertyEventCount
Current number of events in the event queue.
Top
Methods
  NameDescription
Public methodFireDelayed(Single, GameEvent)
Fires the passed event after a short delay.
Public methodFireDelayed(Single, Object, Object)
Fires the passed event after a short delay.
Public methodFireImmediately(GameEvent)
Fires the passed event immediately, notifying all listeners.
Public methodFireImmediately(Object, Object)
Fires the passed event immediately, notifying all listeners.
Public methodProcessEvents
Passes all queued events on to interested listeners and clears the event queue.
Public methodProcessEvents(Single)
Passes all queued events on to interested listeners and clears the event queue.
Public methodQueueEvent(Object)
Queues a new event of the specified type along without any event data.
Public methodQueueEvent(GameEvent)
Queues the passed event to be processed later.
Public methodQueueEvent(Object, Object)
Queues a new event of the specified type along with the passed event data.
Public methodRegisterListener(EventManagerEventDelegate)
Registers the specified delegate for all events. Note that the delegate will be called twice if it is registered for a specific event type as well. Listeners for all events are always notified before listeners for specific events.
Public methodRegisterListener(Object, EventManagerEventDelegate)
Registers the specified delegate for events of the specified type.
Public methodRemoveListener(EventManagerEventDelegate)
Unregisters the specified delegate for all events. Note that this will remove the delegate from the list of listeners interested in all events, only: Calling this function will not remove the delegate from specific events.
Public methodRemoveListener(Object, EventManagerEventDelegate)
Unregisters the specified delegate for events of the specified type.
Top
Events
  NameDescription
Public eventUnhandledEvent
Callback for events no listener is registered for. Useful for improving performance.
Top
See Also