Class EventChannel<T0, T1>
Generic implementation of EventChannelBase. Event channels are used to send and receive event messages.
Implements
Inherited Members
Namespace: Unity.Behavior
Assembly: Unity.Behavior.dll
Syntax
public abstract class EventChannel<T0, T1> : EventChannelBase, IEventHandlerWithoutNotify
Type Parameters
Name | Description |
---|---|
T0 | Type of the first message variable |
T1 | Type of the second message variable |
Methods
CreateEventHandler(BlackboardVariable[], Action)
Creates an event handler for the channel.
Declaration
public override Delegate CreateEventHandler(BlackboardVariable[] vars, Action callback)
Parameters
Type | Name | Description |
---|---|---|
BlackboardVariable[] | vars | The Blackboard Variables which will receive the data for the message. |
Action | callback | The callback to be called for the event. |
Returns
Type | Description |
---|---|
Delegate | The created event handler. |
Overrides
CreateEventHandlerWithoutNotify(BlackboardVariable[], Action)
Creates an event handler for the channel. Version without notifying OnValueChange for StartOnEvent.TriggerBehavior.Queue.
Declaration
public virtual Delegate CreateEventHandlerWithoutNotify(BlackboardVariable[] vars, Action callback)
Parameters
Type | Name | Description |
---|---|---|
BlackboardVariable[] | vars | The Blackboard Variables which will receive the data for the message. |
Action | callback | The callback to be called for the event. |
Returns
Type | Description |
---|---|
Delegate | The created event handler. |
RegisterListener(Delegate)
Registers a listener to the channel.
Declaration
public override void RegisterListener(Delegate del)
Parameters
Type | Name | Description |
---|---|---|
Delegate | del |
Overrides
SendEventMessage(BlackboardVariable[])
Sends an event message on the channel.
Declaration
public override void SendEventMessage(BlackboardVariable[] messageData)
Parameters
Type | Name | Description |
---|---|---|
BlackboardVariable[] | messageData | The Blackboard Variables holding the data for the message. |
Overrides
SendEventMessage(T0, T1)
Send an event message on the channel.
Declaration
public void SendEventMessage(T0 value0, T1 value1)
Parameters
Type | Name | Description |
---|---|---|
T0 | value0 | First value to send on the channel. |
T1 | value1 | Second value to send on the channel. |
UnregisterListener(Delegate)
Unregisters a listener from the channel.
Declaration
public override void UnregisterListener(Delegate del)
Parameters
Type | Name | Description |
---|---|---|
Delegate | del |
Overrides
Events
Event
Occurs when the event channel raises an event.
Declaration
public event EventChannel<T0, T1>.EventHandlerDelegate Event
Event Type
Type | Description |
---|---|
EventChannel<T0, T1>.EventHandlerDelegate |