R-Type  2
Doom but in better
Loading...
Searching...
No Matches
CollisionSystem.hpp File Reference
#include <unordered_map>
#include <functional>
#include "Registry.hpp"
#include "Position.hpp"
#include "Collider.hpp"
#include "Type.hpp"
Include dependency graph for CollisionSystem.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void collision_system (Registry &r, ComponentContainer< Position > &positions, ComponentContainer< Collider > &colliders, ComponentContainer< Type > &types)
 Collision detection and resolution system.
 

Function Documentation

◆ collision_system()

void collision_system ( Registry & r,
ComponentContainer< Position > & positions,
ComponentContainer< Collider > & colliders,
ComponentContainer< Type > & types )

Collision detection and resolution system.

This function handles the detection of collisions between game entities, such as players, monsters, and obstacles. It checks for overlap between entities' positions and takes appropriate actions based on the nature of the collision, such as applying damage or triggering events.

Parameters
rThe Registry that contains all game entities and their components.
positionsThe container of the component Position.
collidersThe container of the component Collider.
typesThe container of the component Type.

Definition at line 102 of file CollisionSystem.cpp.