EventManager
Importing the class
If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.
Description
Manages the registration and handling of custom handlers for the various events of the game.You can register event handlers for pretty much everything, but make sure that the class you are referencing is documented as an event, otherwise you're in for a nasty surprise.
Members
register(consumer as function(t as T) as void)
Registers a new event listener.
Parameters:
consumer: function(t as T) as void
Type: function(t as T) as void
- The event handler. register(phase as ZenEventPhase, consumer as function(t as T) as void)
Registers a new event listener for the specified
ZenEventPhase
. Parameters:
consumer: function(t as T) as void
Type: function(t as T) as void
- The event handler. register(listenToCanceled as bool, consumer as function(t as T) as void)
Registers a new event listener that can listen to cancelled events.
Parameters:
listenToCanceled: bool
Type: bool
- Whether cancelled events should also be listened to or not. consumer: function(t as T) as void
Type: function(t as T) as void
- The event handler. register(phase as ZenEventPhase, listenToCanceled as bool, consumer as function(t as T) as void)
Registers a new event listener for the specified
ZenEventPhase
that can listen to cancelled events. Parameters:
listenToCanceled: bool
Type: bool
- Whether cancelled events should also be listened to or not. consumer: function(t as T) as void
Type: function(t as T) as void
- The event handler.