18 std::cout <<
"spawning monster..." << std::endl;
34void spawn_player(
Registry &
r,
const float pos_x,
const float pos_y,
const uint32_t client_id,
const std::string &username)
@ P_SPAWN
Represents a spawn event.
loot_enum
Defines the different types of loot that can be dropped in the game.
int randint(int min, int max)
Function to generate a random integer.
void spawn_obstacle(Registry &r, const float pos_x, const float pos_y)
Spawns an obstacle at the specified position.
void spawn_missile(Registry &r, const float pos_x, const float pos_y, const type_enum owner)
Spawns a missile at the specified position.
void spawn_monster_system(Registry &r)
Spawns a monster periodically based on the spawn timer.
void spawn_monster(Registry &r, const float pos_x, const float pos_y)
Spawns a monster at the specified position.
float spawn_obstacle_timer
void spawn_powerup(Registry &r, const float pos_x, const float pos_y, const loot_enum type)
Spawns a power-up at the specified position.
void spawn_player(Registry &r, const float pos_x, const float pos_y, const uint32_t client_id, const std::string &username)
Spawns a player with the specified username at the given position.
void spawn_obstacle_system(Registry &r)
Spawns obstacles periodically based on the spawn timer.
type_enum
Defines the different types of entities in the game.
Represents an entity in an Entity-Component-System (ECS) architecture.
void notify(const GameMessage &event)
Notifies the subscribed listener of an event.
Manages entities and their associated components, enabling the creation, deletion,...
Entity spawn_entity()
Creates a new entity.
EventDispatcher * dispatcher
reference< Component > add_component(const Entity &entity, Component &&component)
Adds a component to an entity.
float deltaTime
The time difference between the current frame and the last frame.
Represents the behaviour of an entity, including the type and a timer for timed behaviours.
Represents a circular collider for an entity, defined by its radius.
A structure representing a game message.
Represents the health of an entity, including current and maximum health values.
Represents an image asset with a specified width and height.
Represents the remaining lifetime of an entity or object.
Represents a loot drop with a specific loot type.
Represents information about a player, specifically their username.
Represents the position of an entity in a 2D space.
Represents a power-up item and its enabled state.
Represents the team affiliation of an entity.
Represents the type of an entity in the game.
Represents the velocity of an entity in a 2D space.
Represents a weapon and its attributes in the game.