VEGO-Engine  0.1
Loading...
Searching...
No Matches
InteractionComponent Class Reference

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ InteractionComponent()

InteractionComponent::InteractionComponent ( std::function< void(void *, void *)> callback)

Constructor for the InteractionComponent.

Parameters
callbackA function to be called when an interaction event is triggered. void* actor, void* data are passed to the callback function from InteractionEventdataStruct.

The documentation for this class was generated from the following files: