Nymph Game Engine
Chaiscript based Game Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
set_active_event.h
Go to the documentation of this file.
1 #ifndef SET_ACTIVE_EVENT_H
2 #define SET_ACTIVE_EVENT_H
3 #include <glm/glm.hpp>
4 #include "events/event.h"
5 #include "events/event_type.h"
6 
7 //= SCRIPTABLE
8 //= SCRIPTABLE BASES Event
9 
13 class SetActiveEvent : public Events::Event {
14  private:
15  bool active;
16  public:
17  //= BEGIN SCRIPTABLE
18 
24  SetActiveEvent(const bool active) : Event(Events::EventType::SET_ACTIVE), active(active) {}
32  static std::shared_ptr<SetActiveEvent> create(const bool active) { return std::make_shared<SetActiveEvent>(active); }
38  bool getActive() const noexcept { return active; }
39  //= END SCRIPTABLE
40 };
41 
42 #endif
Class for event.
Definition: event.h:10
SetActiveEvent(const bool active)
Constructs a SetActiveEvent.
Definition: set_active_event.h:24
Class for set active event.
Definition: set_active_event.h:13
bool getActive() const noexcept
Gets active.
Definition: set_active_event.h:38
EventType
Event type enum that is used when passing events.
Definition: event_type.h:12
Definition: event_type.h:27
static std::shared_ptr< SetActiveEvent > create(const bool active)
Factory function.
Definition: set_active_event.h:32
Event(const EventType &type)
Event constructor.
Definition: event.h:21