0
0
mirror of https://github.com/Nimac0/SDL_Minigame synced 2026-01-12 15:53:42 +00:00
SDL_Minigame/include/InteractionComponent.h
2024-06-21 17:39:07 +02:00

23 lines
487 B
C++

#pragma once
#include "Component.h"
#include "Entity.h"
#include <vector>
class InteractionComponent : public Component
{
public:
InteractionComponent(bool canInteract, bool isInteractable);
~InteractionComponent();
void init() override;
void update() override;
Entity* getClosestInteractableEntity(/*last direction key input*/ std::vector<Entity*> entities);
bool interact(Entity* interactee);
private:
bool canInteract;
bool isInteractable;
};