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

A player who lost a life during the tick. More...

#include <aegis2d/ecs/lives.hpp>

Public Member Functions

constexpr bool out () const noexcept
 Tells whether the player has no life left.
 

Public Attributes

Entity player {}
 The player.
 
std::uint32_t lives_left = 0
 Lives left after this death; 0 means the player is out.
 
std::uint32_t score = 0
 The player's Score at that moment (0 without a Score), kept for the end screen since an out player is destroyed.
 

Friends

constexpr bool operator== (const LifeLost &, const LifeLost &) noexcept=default
 Compares the events.
 

Detailed Description

A player who lost a life during the tick.

Member Function Documentation

◆ out()

constexpr bool aegis2d::ecs::LifeLost::out ( ) const
inlineconstexprnoexcept

Tells whether the player has no life left.

Returns
true when lives_left is 0.

Friends And Related Symbol Documentation

◆ operator==

constexpr bool operator== ( const LifeLost &  ,
const LifeLost &   
)
friend

Compares the events.

Member Data Documentation

◆ lives_left

std::uint32_t aegis2d::ecs::LifeLost::lives_left = 0

Lives left after this death; 0 means the player is out.

◆ player

Entity aegis2d::ecs::LifeLost::player {}

The player.

◆ score

std::uint32_t aegis2d::ecs::LifeLost::score = 0

The player's Score at that moment (0 without a Score), kept for the end screen since an out player is destroyed.


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