mirror of
https://github.com/Nimac0/SDL_Minigame
synced 2026-01-12 15:53:42 +00:00
23 lines
487 B
C++
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;
|
|
}; |