Files
Destrum/lightkeeper/include/components/InteractableButton.h
T

32 lines
845 B
C++

#ifndef LIGHTKEEPER_INTERACTABLEBUTTON_H
#define LIGHTKEEPER_INTERACTABLEBUTTON_H
#include <components/Interactable.h>
#include <cstddef>
class InteractableButton final : public Interactable {
public:
explicit InteractableButton(GameObject& parent);
std::string GetTypeName() const override { return "InteractableButton"; }
void Start() override;
void Interact(GameObject& interactor) override;
nlohmann::json Serialize() const override;
void Deserialize(const nlohmann::json& data) override;
void ImGuiInspector() override;
[[nodiscard]] std::size_t GetColorIndex() const { return m_ColorIndex; }
[[nodiscard]] int GetPressCount() const { return m_PressCount; }
private:
void ApplyColor();
std::size_t m_ColorIndex{0};
int m_PressCount{0};
};
#endif // LIGHTKEEPER_INTERACTABLEBUTTON_H