|
VR-Engage
2.2
|
DtVreDiGuyController extends the base DiGuy controller with VRE-specific logic to better support player control and animation states. It provides overrides for certain behaviors to fix logic errors in the base implementation and to ensure proper animation selection based on various entity states.
#include <vreDiGuyController.h>
Public Member Functions | |
| DtVreDiGuyController (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| virtual | ~DtVreDiGuyController () override |
| virtual const char * | type () const override |
| virtual void | tick () override |
| void | DtDiGuyController_tick () |
| virtual void | preFirstTickInit () override |
Public Member Functions inherited from makVre::DtVreSimComponent< DtDiGuyController > | |
| DtVreSimComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| virtual | ~DtVreSimComponent () |
| bool | isPlayerControlled (const std::string &role="") const |
| DtString | entitySystemName () const |
Static Public Member Functions | |
| static DtSimComponent * | creator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) |
Private Member Functions | |
| DtVreDiGuyController () | |
| DtVreDiGuyController (const DtVreDiGuyController &orig) | |
| const DtVreDiGuyController & | operator= (const DtVreDiGuyController &orig) |
| makVre::DtVreDiGuyController::DtVreDiGuyController | ( | const DtString & | name, |
| DtLocalObject * | owner, | ||
| DtSimulationServices * | simManager, | ||
| DtComponentDescriptor * | desc = 0, | ||
| DtReaderWriterRegistry * | parentRegistry = 0 ) |
Constructor.
| name | The name of this component |
| owner | The local object that owns this component |
| simManager | The simulation services manager |
| desc | Component descriptor with configuration parameters |
| parentRegistry | Optional parent registry for reader/writer functionality |
Creates a new DiGuy controller component with the specified parameters.
Referenced by DtVreDiGuyController(), and operator=().
|
overridevirtual |
Virtual destructor.
Cleans up resources used by the DiGuy controller component.
|
private |
VRE override to handle ordered animations (currently commented out)
This would override the base class method to obey ordered animation regardless of posture, fixing issue VRE-3299. However, it's currently disabled because it would prevent injured animations from showing when embarked in vehicles. Future improvement needed: posture should not override ordered animation, but injured or dead state should still take precedence.
Default constructor (not implemented)
Default constructor is private and not implemented to prevent creation of instances without proper initialization.
|
private |
Copy constructor (not implemented)
Copy constructor is private and not implemented to prevent copy construction.
References DtVreDiGuyController().
|
overridevirtual |
Gets the type identifier for this component.
Implements the DtSimComponent::type() method to return the type identifier for this component.
|
static |
Factory method to create a new instance of this component.
| name | The name for the new component |
| owner | The local object that will own this component |
| simManager | The simulation services manager |
| desc | Optional component descriptor |
| parentRegistry | Optional parent registry for reader/writer functionality |
Static factory method used by the component creation system to instantiate new instances of this component type.
|
overridevirtual |
Updates the controller state each simulation frame.
Overridden to give up animation control when the entity is player-controlled. This allows player inputs to directly control animation states rather than having the AI controller determine animations.
| void makVre::DtVreDiGuyController::DtDiGuyController_tick | ( | ) |
|
overridevirtual |
Performs initialization before the first simulation tick.
Sets up initial states and configurations before the simulation begins. This initialization is performed once before the first tick of the simulation.
|
private |
Assignment operator (not implemented)
Assignment operator is private and not implemented to prevent assignment.
References DtVreDiGuyController().