Table of Contents

Class GameEventGeneric4<T, U, W, K>

Namespace
ElectricDrill.SoapRpgFramework.Events
Assembly
com.electricdrill.soap-rpg-framework.Runtime.dll

A generic ScriptableObject-based event system that can carry four parameters of types T, U, W, and K. Supports both MonoBehaviour-based listeners and code-based Action listeners.

public abstract class GameEventGeneric4<T, U, W, K> : ScriptableObject, IRaisable<T, U, W, K>

Type Parameters

T

The type of the first parameter this event carries.

U

The type of the second parameter this event carries.

W

The type of the third parameter this event carries.

K

The type of the fourth parameter this event carries.

Inheritance
object
GameEventGeneric4<T, U, W, K>
Implements
IRaisable<T, U, W, K>

Methods

Raise(T, U, W, K)

Raises the event with the specified contexts, notifying all registered listeners. Both MonoBehaviour listeners and Action listeners are notified.

public virtual void Raise(T contextT, U contextU, W contextW, K contextK)

Parameters

contextT T

The first parameter to pass to all listeners.

contextU U

The second parameter to pass to all listeners.

contextW W

The third parameter to pass to all listeners.

contextK K

The fourth parameter to pass to all listeners.

RegisterListener(GameEventListenerGeneric4<T, U, W, K>)

Registers a MonoBehaviour-based listener to be notified when this event is raised. Duplicate listeners are automatically prevented.

public void RegisterListener(GameEventListenerGeneric4<T, U, W, K> listener)

Parameters

listener GameEventListenerGeneric4<T, U, W, K>

The GameEventListenerGeneric4 to register.

UnregisterListener(GameEventListenerGeneric4<T, U, W, K>)

Unregisters a MonoBehaviour-based listener so it will no longer be notified when this event is raised.

public void UnregisterListener(GameEventListenerGeneric4<T, U, W, K> listener)

Parameters

listener GameEventListenerGeneric4<T, U, W, K>

The GameEventListenerGeneric4 to unregister.

Events

OnEventRaised

Event that can be subscribed to from code using standard C# event syntax. Automatically handles registration and unregistration of Action listeners.

public virtual event Action<T, U, W, K> OnEventRaised

Event Type

Action<T, U, W, K>