Aegis2D
Modular C++26 2D game engine for networked games
Loading...
Searching...
No Matches
lives.hpp File Reference

Player deaths: lives, respawn and game over. More...

#include <aegis2d/core/math.hpp>
#include <aegis2d/ecs/components.hpp>
#include <aegis2d/ecs/damage.hpp>
#include <aegis2d/ecs/entity.hpp>
#include <aegis2d/ecs/registry.hpp>
#include <cstddef>
#include <cstdint>
#include <vector>

Go to the source code of this file.

Classes

struct  aegis2d::ecs::LifeLost
 A player who lost a life during the tick. More...
 

Namespaces

namespace  aegis2d
 Root namespace of the engine.
 
namespace  aegis2d::ecs
 Entity-Component-System used by client and server.
 

Functions

void aegis2d::ecs::handle_player_deaths (Registry &registry, const DamageReport &report, std::vector< LifeLost > &lost)
 Takes a life from each killed player and respawns those who have some left.
 
std::size_t aegis2d::ecs::players_left (const Registry &registry)
 Number of players still in the game.
 
bool aegis2d::ecs::game_over (const Registry &registry)
 Tells whether every player is out.
 

Detailed Description

Player deaths: lives, respawn and game over.