R-Type  2
Doom but in better
Loading...
Searching...
No Matches
AISystem.cpp File Reference
#include "AISystem.hpp"
#include "Time.hpp"
#include "Zipper.hpp"
Include dependency graph for AISystem.cpp:

Go to the source code of this file.

Functions

void ai_system (Registry &r, ComponentContainer< Behaviour > &behaviours, ComponentContainer< Velocity > &velocities)
 AI system that updates the behaviour and velocity of entities.
 

Function Documentation

◆ ai_system()

void ai_system ( Registry & r,
ComponentContainer< Behaviour > & behaviours,
ComponentContainer< Velocity > & velocities )

AI system that updates the behaviour and velocity of entities.

This function implements the AI logic for entities, updating their Behaviour and Velocity components based on the time elapsed (delta_time). The AI may change the entity's state or move it depending on its behaviour.

Parameters
rThe Registry that holds all the game entities and their components.
behavioursThe container of the component Behaviour.
velocitiesThe container of the component Velocity.

Definition at line 6 of file AISystem.cpp.