feat: add Activateable in Lightkeeper

This commit is contained in:
2026-10-17 17:00:00 +02:00
parent 89a168f76d
commit 70c940c476
13 changed files with 354 additions and 5 deletions
@@ -4,6 +4,9 @@
#include <components/Interactable.h>
#include <cstddef>
#include <vector>
#include <destrum/ObjectModel/ObjectId.h>
class InteractableButton final : public Interactable {
public:
@@ -21,11 +24,19 @@ public:
[[nodiscard]] std::size_t GetColorIndex() const { return m_ColorIndex; }
[[nodiscard]] int GetPressCount() const { return m_PressCount; }
// Every Activatable on a target object is activated when the button is pressed
void AddTarget(const GameObject& target);
void RemoveTarget(ObjectId target);
[[nodiscard]] const std::vector<ObjectId>& GetTargets() const { return m_Targets; }
private:
void ApplyColor();
void ActivateTargets(GameObject& interactor);
void DrawTargetsInspector();
std::size_t m_ColorIndex{0};
int m_PressCount{0};
std::vector<ObjectId> m_Targets;
};
#endif // LIGHTKEEPER_INTERACTABLEBUTTON_H