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
TThe type of the first parameter this event carries.
UThe type of the second parameter this event carries.
WThe type of the third parameter this event carries.
KThe type of the fourth parameter this event carries.
- Inheritance
-
objectGameEventGeneric4<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
contextTTThe first parameter to pass to all listeners.
contextUUThe second parameter to pass to all listeners.
contextWWThe third parameter to pass to all listeners.
contextKKThe 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
listenerGameEventListenerGeneric4<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
listenerGameEventListenerGeneric4<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>