Table of Contents

Namespace ElectricDrill.AstraRpgFramework.Events

Classes

AttributeChangedGameEvent

Game event that is raised when an attribute changes. Contains information about the attribute that changed, including its previous and new values.

AttributeChangedGameEventListener

Game event that is raised when an attribute changes. Contains information about the attribute that changed, including its previous and new values.

EntityCoreGameEvent

Game event that carries EntityCore data. Used for events that need to pass information about an entity's core component.

EntityCoreGameEventListener

Game event that carries EntityCore data. Used for events that need to pass information about an entity's core component.

EntityLevelDownGameEvent

Event raised when an entity levels down. Payload: EntityLevelChangedContext.

EntityLevelDownGameEventListener

Event raised when an entity levels down. Payload: EntityLevelChangedContext.

EntityLevelUpGameEvent

Event raised when an entity levels up. Payload: EntityLevelChangedContext.

EntityLevelUpGameEventListener

Event raised when an entity levels up. Payload: EntityLevelChangedContext.

EntityLeveledDownGameEventListener

Event to notify the decrease of the level of an entity. Parameters are:

  • the entity that changed level
  • the new level
EntityLeveledUpGameEventListener

Event to notify the increase of the level of an entity. Parameters are:

  • the entity that changed level
  • the new level
EventChannel<TConfig, TEvent, TContext>

Generic base class for event channels that dispatch to a global event (retrieved from a configuration object) and to per-entity extra events. Subclasses bind the config type and the config-provider delegate for their specific system.

The _extras list is serializable: when a consumer field is marked [SerializeField], Unity persists the extra-event references so they can be assigned statically in the Inspector. The System.Func<T, TResult> delegates are not serializable and must be re-initialised after deserialisation via Initialize(Func<TConfig, TEvent>, Func<TConfig>).

GameEvent

A ScriptableObject-based event system that allows decoupled communication between game systems. GameEvents can be raised to notify all registered listeners without requiring direct references. Supports both MonoBehaviour-based listeners and code-based System.Action listeners.

GameEventBase<TListener, TCodeListener>

Shared event dispatch base for parameterless and generic game events. It centralizes listener storage, snapshotting, registration-order delivery, and reentrancy handling.

GameEventGeneric1<T>

A generic ScriptableObject-based event system that can carry one parameter of type T. Supports both MonoBehaviour-based listeners and code-based Action listeners.

GameEventGeneric2<T, U>

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

GameEventGeneric3<T, U, W>

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.

GameEventGeneric4<T, U, W, K>

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.

GameEventListener

MonoBehaviour component that listens to GameEvent objects and responds with UnityEvents. Automatically registers and unregisters itself when enabled/disabled.

GameEventListenerGeneric1<T>

MonoBehaviour component that listens to GameEventGeneric1 objects and responds with UnityEvents. Automatically registers and unregisters itself when enabled/disabled.

GameEventListenerGeneric2<T, U>

MonoBehaviour component that listens to GameEventGeneric2 objects and responds with UnityEvents. Automatically registers and unregisters itself when enabled/disabled.

GameEventListenerGeneric3<T, U, W>

MonoBehaviour component that listens to GameEventGeneric3 objects and responds with UnityEvents. Automatically registers and unregisters itself when enabled/disabled.

GameEventListenerGeneric4<T, U, W, K>

MonoBehaviour component that listens to GameEventGeneric4 objects and responds with UnityEvents. Automatically registers and unregisters itself when enabled/disabled.

IntGameEvent

Game event that carries integer data. A general-purpose event for passing integer values between game systems.

IntGameEventListener

Game event that carries integer data. A general-purpose event for passing integer values between game systems.

StatChangedGameEvent

Game event that is raised when a stat changes. Contains information about the stat that changed, including its previous and new values.

StatChangedGameEventListener

Game event that is raised when a stat changes. Contains information about the stat that changed, including its previous and new values.

Interfaces

GameEventBase<TListener, TCodeListener>.IDispatchInvoker

Invokes the concrete listener signatures for the current raise without introducing per-raise heap allocations.

IEventRegistrar

Allows subscribing and unsubscribing extra per-entity GameEventGeneric1<T> events on any component that exposes event channels (EntityCore, EntityHealth, EntityModifiers, EntityStats, EntityAttributes).

IRaisable<T>

Interface for objects that can be raised with one parameter of type T. Defines the contract for events that carry a single piece of data.

IRaisable<T, U>

Interface for objects that can be raised with two parameters of types T and U. Defines the contract for events that carry two pieces of data.

IRaisable<T, U, V>

Interface for objects that can be raised with three parameters of types T, U, and V. Defines the contract for events that carry three pieces of data.

IRaisable<T, U, V, W>

Interface for objects that can be raised with four parameters of types T, U, V, and W. Defines the contract for events that carry four pieces of data.