ULimenPuzzleModeListener
Overview
ULimenPuzzleModeListener is an actor component that listens for changes in puzzle mode. It provides functionality to set and check if puzzle mode is active, as well as broadcasting events when the puzzle mode state changes.
Properties
Type | Name | Access | Description |
|---|---|---|---|
| OnPuzzleModeChanged | Public | A delegate that gets called when the puzzle mode state changes. It provides a boolean indicating if puzzle mode is active and a pointer to the actor associated with the puzzle mode. |
| bCurrentPuzzleMode | Private | Tracks whether puzzle mode is currently active. |
| CurrentPuzzleActor | Private | Holds a weak reference to the actor that is currently in puzzle mode. |
Functions
Return Type | Signature | Description |
|---|---|---|
| SetPuzzleMode(const bool bPuzzleMode, AActor* PuzzleActor = nullptr) | Sets the active state of the puzzle mode and updates the associated actor if provided. If the same actor is set again, it does nothing. |
| IsPuzzleModeActive() const | Returns whether puzzle mode is currently active. |
Usage & Implementation Notes
Threading Constraints: This component operates on the game thread.
Replication Requirements: None.
Memory Lifetime Management: The component uses a weak pointer to manage the lifetime of the
CurrentPuzzleActor, ensuring that it does not prevent the actor from being destroyed if no longer needed.Initialization Dependencies: The component should be added to an actor and configured in the editor or through blueprints.