VEGO-Engine  0.1
Loading...
Searching...
No Matches
InteractionEventdataStruct.h
1#pragma once
2
3#include "Entity.h"
4#include "InteractionListener.h"
5#include "InteractionManager.h"
6#include "Vector2D.h"
7#include <cstdint>
8#include <memory>
9
16 void* actor;
18 void* data;
20 std::weak_ptr<InteractionListener> target = std::weak_ptr<InteractionListener>();
22 std::shared_ptr<Vector2D> targetingReference = nullptr;
25 uint8_t strategy = 0; // int since enum would be impossibling user defined targetingStrategies
26
27 void triggerEvent();
28};
Struct to hold data for interaction events. This struct is used to pass data to the interaction manag...
Definition InteractionEventdataStruct.h:14
std::weak_ptr< InteractionListener > target
The target of the interaction, e.g. InteractionComponent of an Entity. Is required if strategy is set...
Definition InteractionEventdataStruct.h:20
void * actor
Arbitray data to pass to the interaction listener. Can for example be an Entity ptr to represent the ...
Definition InteractionEventdataStruct.h:16
std::shared_ptr< Vector2D > targetingReference
Coordinates from which to base targeting on. Is required if strategy is not set to 0 (none)
Definition InteractionEventdataStruct.h:22
void * data
The data to pass to the interaction listener. Can be any type of pointer.
Definition InteractionEventdataStruct.h:18
uint8_t strategy
Definition InteractionEventdataStruct.h:25