|
VR-Engage
2.2
|
The DtDisembarkControlLogic component provides functionality for disembarking (exiting) from a vehicle or other parent entity. It handles the "disembark" action from the menu system and sends appropriate messages to either trigger actual disembarkation in the simulation or to return to the role selection screen.
The behavior depends on whether the current role is stacked on another role (typically a Human role) or if it is a standalone role.
#include <disembarkControlLogic.h>
Public Member Functions | |
| DtDisembarkControlLogic () | |
| virtual | ~DtDisembarkControlLogic () override |
| virtual bool | initialize (DtPlayerStation *player, DtInitTable &config) override |
| virtual void | tick (double dt) override |
| virtual void | shutdown () override |
| virtual const char * | type () const override |
| virtual DtVreMessageResult | handleMenuMessage (makVre::DtVreMessage *msg) |
Public Member Functions inherited from makVre::DtPlayerComponent | |
| DtPlayerComponent () | |
| virtual | ~DtPlayerComponent () |
| virtual bool | postInitialize () |
| virtual void | setName (const std::string &name) |
| virtual const std::string & | name () |
| virtual DtPlayerStation & | player () |
| virtual DtAttributeHandle & | playerAttributeStore () |
| virtual const DtAttributeHandle & | playerAttributeStore () const |
Protected Attributes | |
| bool | myIsStackedRole |
Protected Attributes inherited from makVre::DtPlayerComponent | |
| std::string | myName |
| DtInitTable | myConfig |
| DtPlayerStation * | myPlayer |
| makVrv::DtDe * | myDe |
| DtEntityResolver * | myResolver |
| DtAttributeCallbackManager | myAttributeCallbacks |
Additional Inherited Members | |
Protected Member Functions inherited from makVre::DtPlayerComponent | |
| virtual void | initializeStateAttributes () |
| makVre::DtDisembarkControlLogic::DtDisembarkControlLogic | ( | ) |
Constructor for DtDisembarkControlLogic.
Initializes the component with default values.
|
overridevirtual |
Virtual destructor for DtDisembarkControlLogic.
|
overridevirtual |
Initializes the component with configuration from Lua.
Sets up a message handler for the MenuActionMessage type and determines whether this role is stacked on a base role or is standalone.
| player | Pointer to the player station this component belongs to |
| config | Configuration table containing initialization parameters |
Reimplemented from makVre::DtPlayerComponent.
References makVre::DtPlayerComponent::player().
|
overridevirtual |
Updates the component state (empty implementation)
This method is called each frame but currently has no implementation.
| dt | Delta time in seconds since the last tick |
Implements makVre::DtPlayerComponent.
|
overridevirtual |
Shuts down the component.
Removes the MenuActionMessage handler to prevent duplicate processing.
Reimplemented from makVre::DtPlayerComponent.
|
overridevirtual |
Returns the type identifier for this component.
Implements makVre::DtPlayerComponent.
|
virtual |
Handles menu action messages.
Processes the "disembark" menu action. If this is a stacked role, sends a VrfSetEmbarkMessage to disembark the base player from its parent entity. If this is a standalone role, sends a UIChooseRoleButtonClickedMessage to return to the role selection screen.
After processing the disembark action, removes itself as a handler to prevent duplicate processing.
| msg | The message to process |
|
protected |
Flag indicating if this role is stacked on another role.
True if this is a stacked role (typically stacked on a Human role), false if this is a standalone role. Affects disembarkation behavior.