Adds support for History data, allowing us to store specific interesting occurrences in the data flow, and recall them later.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
#include "../../Library/Exceptions/CreatureException.hpp"
|
||||
#include "Events/EventData.hpp"
|
||||
|
||||
template <class T> concept Event = std::is_base_of<CreatureLib::Battling::EventData, T>::value;
|
||||
template <class T> concept EventDataType = std::is_base_of<CreatureLib::Battling::EventData, T>::value;
|
||||
|
||||
namespace CreatureLib::Battling {
|
||||
/// The Event Hook class allows users to write consumers for the battle events, for example to write User Interfaces
|
||||
@@ -41,7 +41,7 @@ namespace CreatureLib::Battling {
|
||||
size_t GetPosition() const noexcept { return _offset; }
|
||||
size_t GetCapacity() const noexcept { return _capacity; }
|
||||
|
||||
template <Event T, class... parameters> void Trigger(parameters... args) {
|
||||
template <EventDataType T, class... parameters> void Trigger(parameters... args) {
|
||||
if (_listeners.size() == 0)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user