R-Type
Distributed multiplayer game engine in C++
Loading...
Searching...
No Matches
AISystem.hpp
Go to the documentation of this file.
1/*
2** EPITECH PROJECT, 2025
3** RTYPE
4** File description:
5** AISystem
6*/
7
8#pragma once
9
10#include "../../Components/Enemy.hpp"
11#include "../../Components/Transform.hpp"
12#include "../../Components/Velocity.hpp"
13#include "../ISystem.hpp"
14
15namespace ecs {
23 class AISystem : public ISystem {
24 public:
28 AISystem() = default;
29
33 ~AISystem() override = default;
34
44 void update(Registry &registry, float deltaTime) override;
45
51 ComponentMask getComponentMask() const override;
52
53 private:
62 void applyMovementPattern(const Enemy &enemy, Transform &transform, Velocity &velocity,
63 float deltaTime);
64 };
65}
System managing enemy AI behavior and attack patterns.
Definition AISystem.hpp:23
~AISystem() override=default
Default destructor.
AISystem()=default
Default constructor.
ComponentMask getComponentMask() const override
Gets the component mask for this system.
Definition AISystem.cpp:45
void update(Registry &registry, float deltaTime) override
Updates all enemy AI behaviors.
Definition AISystem.cpp:17
void applyMovementPattern(const Enemy &enemy, Transform &transform, Velocity &velocity, float deltaTime)
Applies movement pattern to an enemy entity.
Definition AISystem.cpp:38
Component identifying an entity as an enemy with AI behavior.
Definition Enemy.hpp:20
Base interface for all ECS systems.
Definition ISystem.hpp:37
Manages entities, their signatures and component type registrations.
Definition Registry.hpp:68
Component representing position, rotation and scale in 2D space.
Definition Transform.hpp:20
Component representing movement direction and speed.
Definition Velocity.hpp:20
Maximum number of distinct component types supported by the Registry.
Definition GameLogic.hpp:26
std::uint64_t ComponentMask
Type alias for component bitmask.
Definition ISystem.hpp:24