![]() |
ImagoEngine
A C++ 2D game engine built on a sparse-set ECS, with scenes, scheduled systems, events, and action-based input
|
Defines the Broadcaster to emit events for subscribed systems. More...
#include <cstdint>#include <functional>#include <unordered_map>#include <algorithm>#include <cassert>#include <type_traits>#include <spdlog/spdlog.h>#include <vector>

Go to the source code of this file.
Classes | |
| class | Imago::Engine::Broadcaster |
| Broadcaster acts as ImagoEngine's event system. It lets systems communicate without knowing about eachother. More... | |
Typedefs | |
| using | Imago::Engine::EventTypeId = uint32_t |
| Alias for event ids in event storage. | |
Functions | |
| template<typename T> | |
| EventTypeId | Imago::Engine::get_event_type_id () |
| Returns the EventTypeId for the event of type T. | |
Defines the Broadcaster to emit events for subscribed systems.
| EventTypeId Imago::Engine::get_event_type_id | ( | ) |
Returns the EventTypeId for the event of type T.
The id is assigned the first time this is called for a given event of type T. Sice the id is static the id is the same for every following call with that component type.
| The | event type |