|
Aegis2D
Modular C++26 2D game engine for networked games
|
Lives of a player, and how it comes back after losing one. More...
#include <aegis2d/ecs/components.hpp>
Public Attributes | |
| std::uint32_t | count = 3 |
| Lives left, the current one included; 0 once the player is out. | |
| Vec2 | spawn {} |
| Where the player respawns (Transform::position). | |
| std::int32_t | health = 1 |
| Health points given back on respawn. | |
Lives of a player, and how it comes back after losing one.
When the player's health reaches zero, ecs::handle_player_deaths() takes a life; while lives remain, the player respawns at spawn with health points instead of being destroyed.
| std::uint32_t aegis2d::ecs::Lives::count = 3 |
Lives left, the current one included; 0 once the player is out.
| std::int32_t aegis2d::ecs::Lives::health = 1 |
Health points given back on respawn.
| Vec2 aegis2d::ecs::Lives::spawn {} |
Where the player respawns (Transform::position).