Nymph Game Engine
Chaiscript based Game Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
animation_trigger_event.hpp
Go to the documentation of this file.
1 #ifndef ANIMATION_TRIGGER_EVENT_H
2 #define ANIMATION_TRIGGER_EVENT_H
3 #include <glm/glm.hpp>
4 #include <easylogging++.h>
5 #include "events/event.h"
6 #include "events/event_type.h"
7 
8 namespace Game {
12  template<typename StateType>
14  private:
15  StateType state;
16  public:
22  AnimationTriggerEvent(const StateType& state) : Event(Events::EventType::ANIMATION_TRIGGER), state(state) {}
30  static std::shared_ptr<AnimationTriggerEvent<StateType>> create(const StateType& state) { return std::make_shared<AnimationTriggerEvent<StateType>>(state); }
36  StateType getState() const noexcept { return state; }
37  };
38 }
39 
40 #endif
Class for event.
Definition: event.h:10
Class for animation trigger event.
Definition: animation_trigger_event.hpp:13
StateType getState() const noexcept
Gets the state.
Definition: animation_trigger_event.hpp:36
EventType
Event type enum that is used when passing events.
Definition: event_type.h:12
Definition: event_type.h:30
static std::shared_ptr< AnimationTriggerEvent< StateType > > create(const StateType &state)
Factory function.
Definition: animation_trigger_event.hpp:30
Event(const EventType &type)
Event constructor.
Definition: event.h:21
AnimationTriggerEvent(const StateType &state)
AnimationTriggerEvent constructor.
Definition: animation_trigger_event.hpp:22