3#include "Components.hpp"
8 std::vector<GameMessage> state;
10 for (
auto &&[idx, pos, type] :
IndexedZipper(positions, types)) {
12 if (!pos || !type)
continue;
24 if (type->type ==
PLAYER) {
26 }
else if (type->type ==
MONSTER) {
29 if (teams[idx]->team ==
ENEMY)
@ P_SPAWN
Represents a spawn event.
std::vector< GameMessage > syncGameState(Registry &r)
Creates the.
Combines multiple containers into a single iterable unit, iterating over corresponding elements from ...
Manages entities and their associated components, enabling the creation, deletion,...
std::tuple< ComponentContainer< Components > &... > get_component_array()
Retrieves component containers for multiple component types.
A structure representing a game message.
messageType type
The type of message (e.g., SPAWN, MOVE, etc.).
messageInfo msg
Additional information about the event (status, asset ID, and coordinates).
std::size_t id
The unique identifier for the entity or object involved in the event.
Represents the position of an entity in a 2D space.
Represents the team affiliation of an entity.
Represents the type of an entity in the game.
coord coords
Coordinates associated with the event, such as the position of an entity.
int asset_id
ID representing the game asset related to the event (e.g., entity or object).