VEGO-Engine  0.1
Loading...
Searching...
No Matches
InteractionComponent Class Reference
Inheritance diagram for InteractionComponent:
[legend]
Collaboration diagram for InteractionComponent:
[legend]

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< Vector2DgetPosition () override
 Internal function to use as reference for targeting.
 
- Public Member Functions inherited from Component
virtual void init ()
 
virtual void update (uint_fast16_t diffTime)
 

Additional Inherited Members

- Public Attributes inherited from Component
Entityentity
 

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.

Member Function Documentation

◆ getPosition()

std::shared_ptr< Vector2D > InteractionComponent::getPosition ( )
overridevirtual

Internal function to use as reference for targeting.

Reimplemented from InteractionListener.

◆ interact()

void InteractionComponent::interact ( void * actor,
void * data )
overridevirtual

Internal function to be called when an interaction event is triggered.

Implements InteractionListener.


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