ULimenAbilityBase
Overview
ULimenAbilityBase is an abstract class that extends ULimenStorageItem and implements FTickableGameObject. It serves as a foundational class for various ability implementations within the system. This class handles initialization, deactivation, and tick management, ensuring that abilities can be properly managed and executed in the game world.
Properties
Type | Name | Access | Description |
|---|---|---|---|
| Owner | Private | Weak pointer to the owner of this ability. |
| AbilityComponent | Private | Pointer to the ability component associated with the owner. |
| bIsInitialized | Private | Flag indicating whether the ability is initialized. |
| bShouldForcefullyDeactivate | Private | Flag indicating whether the ability should be forcefully deactivated. |
Functions
Return Type | Signature | Description |
|---|---|---|
| Initialize(AActor* InOwner) | Initializes the ability with a given owner. |
| IsInitialized() const | Checks if the ability is initialized. |
| Deinitialize(AActor* InOwner) | Deinitializes the ability. |
| ForceDeactivateAbility() | Forces the deactivation of the ability. |
| ShouldForcefullyDeactivate() const | Checks if the ability should be forcefully deactivated. |
| Tick(float DeltaTime) | Called every frame to update the ability's state. |
| GetTickableTickType() const | Returns the tick type for this object. |
| IsTickable() const | Determines if the object is tickable. |
| GetStatId() const | Returns a unique identifier for performance statistics. |
| IsTickableWhenPaused() const | Determines if the object should be ticked when paused. |
| IsTickableInEditor() const | Determines if the object should be ticked in the editor. |
| GetTickableGameObjectWorld() const | Returns the world this object is associated with. |
| GetOwnerAbilityComponent() const | Retrieves the ability component associated with the owner. |
| GetOwner() const | Retrieves the owner of this ability. |
Usage & Implementation Notes
Threading Constraints: This class is designed to be tickable and can be used in both game threads and network threads.
Replication Requirements: The class supports networking, allowing remote function calls and handling of RPCs based on the server/client authority.
Memory Lifetime Management: Uses
TWeakObjectPtrfor owner references to avoid memory leaks. Proper initialization and deinitialization methods ensure that resources are managed correctly.Initialization Dependencies: Requires an owner actor upon initialization, which must have a valid
ULimenAbilityComponent.