namespace systems {
class CollisionsSystem : public ISystems {
public:
void operator()(Registry &, std::shared_ptr<IContext> ctx) override;
private:
void sendDestroyedObject(std::shared_ptr<IContext> &ctx, std::size_t i);
};
}; // namespace systems
operator():
Executes collision detection logic during each game cycle.
Registry: Manages entities and their components, including collidable objects.IContext: Provides game context, such as state or settings relevant to collisions.sendDestroyedObject:
Handles the logic for removing or marking an object as destroyed upon collision.
IContext: Context for handling destroyed objects.i: Index of the destroyed object to be processed.