Nymph Game Engine
Chaiscript based Game Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
load_map_event.h
Go to the documentation of this file.
1 #ifndef LOAD_MAP_EVENT_H
2 #define LOAD_MAP_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 
10 namespace Utility {
14  class LoadMapEvent : public Events::Event {
15  private:
16  std::string name;
17  public:
18  //= BEGIN SCRIPTABLE
19 
25  LoadMapEvent(const std::string name) : Event(Events::EventType::LOAD_MAP), name(name) {}
33  static std::shared_ptr<LoadMapEvent> create(const std::string name) { return std::make_shared<LoadMapEvent>(name); }
39  std::string getName() const noexcept { return name; }
40  //= END SCRIPTABLE
41  };
42 }
43 
44 #endif
Definition: event_type.h:35
Class for event.
Definition: event.h:10
static std::shared_ptr< LoadMapEvent > create(const std::string name)
Factory Function.
Definition: load_map_event.h:33
LoadMapEvent(const std::string name)
Creates a LoadMapEvent.
Definition: load_map_event.h:25
Class for load map event.
Definition: load_map_event.h:14
EventType
Event type enum that is used when passing events.
Definition: event_type.h:12
Event(const EventType &type)
Event constructor.
Definition: event.h:21
std::string getName() const noexcept
Gets the name.
Definition: load_map_event.h:39