Nymph Game Engine
Chaiscript based Game Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
set_entity_active_event.h
Go to the documentation of this file.
1 #ifndef SET_ENTITY_ACTIVE_EVENT_H
2 #define SET_ENTITY_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 
14  private:
15  bool active;
16  public:
17  //= BEGIN SCRIPTABLE
18 
24  SetEntityActiveEvent(const bool active) : Event(Events::EventType::SET_ENTITY_ACTIVE), active(active) {}
32  static std::shared_ptr<SetEntityActiveEvent> create(const bool active) { return std::make_shared<SetEntityActiveEvent>(active); }\
38  bool getActive() const noexcept { return active; }
39  //= END SCRIPTABLE
40 };
41 
42 #endif
Class for event.
Definition: event.h:10
bool getActive() const noexcept
Gets active.
Definition: set_entity_active_event.h:38
Class for set entity active event.
Definition: set_entity_active_event.h:13
EventType
Event type enum that is used when passing events.
Definition: event_type.h:12
static std::shared_ptr< SetEntityActiveEvent > create(const bool active)
Factory function.
Definition: set_entity_active_event.h:32
Definition: event_type.h:28
Event(const EventType &type)
Event constructor.
Definition: event.h:21
SetEntityActiveEvent(const bool active)
Constructor for SetEntityActiveEvent.
Definition: set_entity_active_event.h:24