30 lines
623 B
C++
30 lines
623 B
C++
#ifndef LIGHTKEEPER_LIGHTTOGGLE_H
|
|
#define LIGHTKEEPER_LIGHTTOGGLE_H
|
|
|
|
#include <components/Activatable.h>
|
|
|
|
class LightToggle final : public Activatable {
|
|
public:
|
|
explicit LightToggle(GameObject& parent);
|
|
|
|
std::string GetTypeName() const override { return "LightToggle"; }
|
|
|
|
void Start() override;
|
|
|
|
void Reflect(FieldVisitor& v) override;
|
|
void OnFieldsEdited() override;
|
|
|
|
void SetOn(bool on);
|
|
[[nodiscard]] bool IsOn() const { return m_On; }
|
|
|
|
protected:
|
|
void OnActivate(GameObject& instigator) override;
|
|
|
|
private:
|
|
void Apply();
|
|
|
|
bool m_On{true};
|
|
};
|
|
|
|
#endif // LIGHTKEEPER_LIGHTTOGGLE_H
|