Aegis2D
Modular C++26 2D game engine for networked games
Loading...
Searching...
No Matches
despawn.hpp File Reference

Despawn: entities that left the play area for good are destroyed. More...

Go to the source code of this file.

Namespaces

namespace  aegis2d
 Root namespace of the engine.
 
namespace  aegis2d::ecs
 Entity-Component-System used by client and server.
 

Functions

bool aegis2d::ecs::left_for_good (Vec2 position, Vec2 half, Vec2 velocity, const Aabb &area) noexcept
 Tells whether a moving box has left an area and will not come back.
 
void aegis2d::ecs::despawn_outside (Registry &registry, const Aabb &area, std::vector< Entity > &despawned)
 Destroys the entities that have left the play area for good.
 

Detailed Description

Despawn: entities that left the play area for good are destroyed.