|
VEGO-Engine
0.1
|
InteractionComponent class to handle interaction events. More...
#include <InteractionComponent.h>
Public Member Functions | |
| InteractionComponent (std::function< void(void *, void *)> callback) | |
| Constructor for the InteractionComponent. | |
| void | interact (void *actor, void *data) override |
| Internal function to be called when an interaction event is triggered. | |
| std::shared_ptr< Vector2D > | getPosition () override |
| Internal function to use as reference for targeting. | |
InteractionComponent class to handle interaction events.
This class manages interaction events, allowing for the registration of a callback function to be called when an interaction event is triggered.
| InteractionComponent::InteractionComponent | ( | std::function< void(void *, void *)> | callback | ) |
Constructor for the InteractionComponent.
| callback | A function to be called when an interaction event is triggered. void* actor, void* data are passed to the callback function from InteractionEventdataStruct. |