A simple event handler utility. You can attach your functions as Listeners to an event. This meant to provide a simple interface with events in unity. Also, it can be used to create and handle custom events. The EventHandler
instance can be used as a variable and passed around.
Name | Description |
---|
EventHandler .count | The number of the handlers that attached to this event handler instance. |
Name | Description |
---|
EventHandler .Add(function) | Adds a new function as a handler. The value must be a function type to properly attach it. |
EventHandler .Invoke(parameters=nil) | Invokes the event. This calls all the functions that attached to this event. |
EventHandler .RemoveAllListeners() | Removes all the event listeners (functions) attached to this event. |