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

One hit that removed health points. More...

#include <aegis2d/ecs/damage.hpp>

Public Attributes

Entity attacker
 Entity that dealt the damage (its Damage component).
 
Entity target
 Entity that lost health points (its Health component).
 
std::int32_t amount = 0
 Points removed by the hit.
 

Friends

constexpr bool operator== (const Hit &, const Hit &) noexcept=default
 Compares the hits.
 

Detailed Description

One hit that removed health points.

Friends And Related Symbol Documentation

◆ operator==

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

Compares the hits.

Member Data Documentation

◆ amount

std::int32_t aegis2d::ecs::Hit::amount = 0

Points removed by the hit.

◆ attacker

Entity aegis2d::ecs::Hit::attacker

Entity that dealt the damage (its Damage component).

◆ target

Entity aegis2d::ecs::Hit::target

Entity that lost health points (its Health component).


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