Aegis2D
Modular C++26 2D game engine for networked games
Loading...
Searching...
No Matches
aegis2d::ecs::Lives Struct Reference

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.
 

Detailed Description

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.

Member Data Documentation

◆ count

std::uint32_t aegis2d::ecs::Lives::count = 3

Lives left, the current one included; 0 once the player is out.

◆ health

std::int32_t aegis2d::ecs::Lives::health = 1

Health points given back on respawn.

◆ spawn

Vec2 aegis2d::ecs::Lives::spawn {}

Where the player respawns (Transform::position).


The documentation for this struct was generated from the following file: