feat: add interactable component and test button
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#ifndef LIGHTKEEPER_INTERACTABLE_H
|
||||
#define LIGHTKEEPER_INTERACTABLE_H
|
||||
|
||||
#include <destrum/ObjectModel/Component.h>
|
||||
|
||||
class Interactable : public Component {
|
||||
public:
|
||||
virtual void Interact(GameObject& interactor) = 0;
|
||||
|
||||
[[nodiscard]] static Interactable* FindOnObjectOrParents(GameObject* object);
|
||||
|
||||
protected:
|
||||
Interactable(GameObject& parent, const std::string& name)
|
||||
: Component(parent, name) {}
|
||||
};
|
||||
|
||||
#endif // LIGHTKEEPER_INTERACTABLE_H
|
||||
Reference in New Issue
Block a user