Nymph Game Engine
Chaiscript based Game Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
load_character_event.h
Go to the documentation of this file.
1 #ifndef LOAD_CHARACTER_EVENT_H
2 #define LOAD_CHARACTER_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 namespace Utility {
14  private:
15  std::string name;
16  public:
17  //= BEGIN SCRIPTABLE
18 
24  LoadCharacterEvent(const std::string name) : Event(Events::EventType::LOAD_CHARACTER), name(name) {}
32  static std::shared_ptr<LoadCharacterEvent> create(const std::string name) { return std::make_shared<LoadCharacterEvent>(name); }
38  std::string getName() const noexcept { return name; }
39  //= END SCRIPTABLE
40  };
41 }
42 
43 #endif
static std::shared_ptr< LoadCharacterEvent > create(const std::string name)
Factory function.
Definition: load_character_event.h:32
Class for event.
Definition: event.h:10
Definition: event_type.h:36
Class for load character event.
Definition: load_character_event.h:13
LoadCharacterEvent(const std::string name)
Constructs a LoadCharacterEvent.
Definition: load_character_event.h:24
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_character_event.h:38