Class GameEventListenerGeneric1<T>
- Namespace
- ElectricDrill.SoapRpgFramework.Events
- Assembly
- com.electricdrill.soap-rpg-framework.Runtime.dll
MonoBehaviour component that listens to GameEventGeneric1 objects and responds with UnityEvents. Automatically registers and unregisters itself when enabled/disabled.
public class GameEventListenerGeneric1<T> : MonoBehaviour
Type Parameters
TThe type of parameter the listened event carries.
- Inheritance
-
objectGameEventListenerGeneric1<T>
- Derived
Fields
_event
[SerializeField]
protected GameEventGeneric1<T> _event
Field Value
_response
[SerializeField]
protected UnityEvent<T> _response
Field Value
- UnityEvent<T>
Methods
OnEventRaised(T)
Called by the GameEvent when it is raised. Invokes the configured UnityEvent response with the provided context.
public void OnEventRaised(T context)
Parameters
contextTThe data passed from the event.