Class GameEventGeneric3<T, U, W>
- Namespace
- ElectricDrill.AstraRpgFramework.Events
- Assembly
- com.electricdrill.astra-rpg-framework.Runtime.dll
A generic ScriptableObject-based event system that can carry three parameters of types T, U, and W. Supports both MonoBehaviour-based listeners and code-based Action listeners.
public abstract class GameEventGeneric3<T, U, W> : GameEventBase<GameEventListenerGeneric3<T, U, W>, Action<T, U, W>>, IRaisable<T, U, W>
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.
- Inheritance
-
objectGameEventGeneric3<T, U, W>
- Implements
-
IRaisable<T, U, W>
- Inherited Members
Methods
Raise(T, U, W)
Raises the event with the specified contexts, notifying all registered listeners. Both MonoBehaviour listeners and Action listeners are notified in registration order. Listeners are snapshot before iteration so that subscribe/unsubscribe during a callback does not affect the current raise. The non-reentrant path is allocation-free after warmup.
public virtual void Raise(T contextT, U contextU, W contextW)
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.
RegisterListener(GameEventListenerGeneric3<T, U, W>)
Registers a MonoBehaviour-based listener to be notified when this event is raised. Duplicate listeners are automatically prevented.
public void RegisterListener(GameEventListenerGeneric3<T, U, W> listener)
Parameters
listenerGameEventListenerGeneric3<T, U, W>The GameEventListenerGeneric3 to register.
UnregisterListener(GameEventListenerGeneric3<T, U, W>)
Unregisters a MonoBehaviour-based listener so it will no longer be notified when this event is raised.
public void UnregisterListener(GameEventListenerGeneric3<T, U, W> listener)
Parameters
listenerGameEventListenerGeneric3<T, U, W>The GameEventListenerGeneric3 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> OnEventRaised
Event Type
- Action<T, U, W>