feat: add Activateable in Lightkeeper
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user