ALimenDoorBase
Overview
ALimenDoorBase is an abstract class that extends ALimenInteractable. It manages the state of a door (Open, Closed, Opening, Closing) and provides methods to interact with it. The class includes properties for configuration and delegates for state changes. It also defines blueprint-implementable events for animations and utility functions to set the door's state without animation.
Properties
Functions
Return Type | Signature | Description |
|---|---|---|
| SetStartOpen(const bool bNewStartOpen) | Sets whether the door should start open when the game begins. |
| OpenDoor(AController* InController = nullptr, APawn* InPawn = nullptr, const bool bIgnoreRestrictions = true) | Opens the door with optional controller and pawn parameters, and an option to ignore restrictions. |
| OpenDoorWithoutAnimation(AController* InController = nullptr, APawn* InPawn = nullptr, const bool bIgnoreRestrictions = true) | Opens the door without animation, with optional controller and pawn parameters, and an option to ignore restrictions. |
| CloseDoor(AController* InController = nullptr, APawn* InPawn = nullptr) | Closes the door with optional controller and pawn parameters. |
| CloseDoorWithoutAnimation(AController* InController = nullptr, APawn* InPawn = nullptr) | Closes the door without animation, with optional controller and pawn parameters. |
| IsOpen() const | Returns true if the door is currently open. |
| GetDoorState() const | Returns the current state of the door. |
| Interact(AController* InController, APawn* InPawn) | Toggles the door's state between open and closed when interacted with. |
| DoorOpenAnimation() | Blueprint-implementable event for opening the door animation. |
| DoorCloseAnimation() | Blueprint-implementable event for closing the door animation. |
| SetDoorOpenWithoutAnimation() | Blueprint-implementable event to set the door to open state without animation. |
| SetDoorCloseWithoutAnimation() | Blueprint-implementable event to set the door to closed state without animation. |
| ToggleOpenState() | Toggles the door's state between open and closed programmatically. |
| NotifyAnimationFinished(const bool bIsOpenAnimation) | Notifies that a door animation has finished, updating the door's state accordingly. |
| SetDoorState(const EDoorState NewState) | Sets the door to a specific state without triggering animations or notifications. |
Usage & Implementation Notes
The door starts in an undefined state and transitions through states based on interactions.
Animations are handled via blueprint-implementable events, allowing for custom animations in blueprints.
The
DoorComponentTagis used to identify the primitive component that represents the door, enabling navigation mesh updates when the door opens or closes.