|
Aegis2D
Modular C++26 2D game engine for networked games
|
Two entities whose boxes overlap and whose layers interact. More...
#include <aegis2d/ecs/collision.hpp>
Public Attributes | |
| Entity | first |
| Entity with the smaller handle. | |
| Entity | second |
| Entity with the larger handle. | |
| bool | first_hits_second = false |
hits(first's collider, second's collider). | |
| bool | second_hits_first = false |
hits(second's collider, first's collider). | |
Friends | |
| constexpr bool | operator== (const Contact &, const Contact &) noexcept=default |
| Compares the contacts. | |
| constexpr std::strong_ordering | operator<=> (const Contact &, const Contact &) noexcept=default |
| Orders the contacts by entities, then flags. | |
Two entities whose boxes overlap and whose layers interact.
The flags tell who hits whom, so the game knows what to do: a missile that hits an enemy damages it and disappears, an enemy that touches a player hurts the player.
Orders the contacts by entities, then flags.
| bool aegis2d::ecs::Contact::first_hits_second = false |
hits(first's collider, second's collider).
| bool aegis2d::ecs::Contact::second_hits_first = false |
hits(second's collider, first's collider).