ALimenObjectivesManager
Overview
ALimenObjectivesManager is a subclass of ALimenGameplayManager responsible for managing and tracking objectives for players. It initializes objectives, loads them for specific players, and handles objective events.
Properties
Type | Name | Access | Description |
|---|---|---|---|
TArray<TSubclassOf > | ObjectivesClassList | EditDefaultsOnly | A list of objective classes to be instantiated. |
TArray<ALimenObjective*> | ObjectiveInstances | Private | An array holding instances of all objectives managed by this manager. |
Functions
Return Type | Signature | Description |
|---|---|---|
void | Start() | Initializes the objectives when the manager starts. Spawns objective instances and sets up event bindings. |
TArray<ALimenObjective*> | LoadObjectivesForPlayer(APlayerController* Controller, APawn* Pawn, const TArray<TSubclassOf >& InObjectives) const | Loads specific objectives for a player's pawn. |
TArray<ALimenObjective*> | GetObjectivesForPlayer(const APlayerController* Controller, const APawn* Pawn) const | Retrieves all objectives bound to a specific player and pawn. |
const TArray<ALimenObjective*>& | GetObjectivesInstances() const | Returns a reference to the array of all objective instances managed by this manager. |
template ObjectiveClass* FindObjective() const | Finds an objective instance of a specific type. | |
ALimenObjective* FindObjective(const TSubclassOf & ObjectiveClass) const | Finds an objective instance of a specific class. | |
void | ObjectiveAdded(ALimenObjective* Objective, const FObjectiveData& Data) | Handles the event when an objective is added. Tracks the objective in the player's inventory component. |
Usage & Implementation Notes
Threading Constraints: This manager operates on the game thread and should not be accessed from other threads.
Replication Requirements: None.
Memory Lifetime Management: Objective instances are managed by this manager, ensuring they are properly spawned and destroyed.
Initialization Dependencies: Depends on
ALimenGameplayManagerfor initialization.