|
Air-Trap 1.0.0
A multiplayer R-Type clone game engine built with C++23 and ECS architecture
|
System to handle enemy AI behavior. More...
#include <EnemyAISystem.hpp>
Public Member Functions | |
| EnemyAISystem (ecs::Registry ®istry) | |
| Constructor for EnemyAISystem. | |
| void | update (float dt) override |
| Update enemy AI system logic for one frame. | |
Public Member Functions inherited from rtp::ecs::ISystem | |
| virtual | ~ISystem () noexcept=default |
Private Attributes | |
| ecs::Registry & | _registry |
| Reference to the entity registry. | |
| float | _time {0.0f} |
| Elapsed time for AI calculations. | |
System to handle enemy AI behavior.
Definition at line 29 of file EnemyAISystem.hpp.
| rtp::server::EnemyAISystem::EnemyAISystem | ( | ecs::Registry & | registry | ) |
Constructor for EnemyAISystem.
| registry | Reference to the entity registry |
Definition at line 21 of file EnemyAISystem.cpp.
|
overridevirtual |
Update enemy AI system logic for one frame.
| dt | Time elapsed since last update in seconds |
Implements rtp::ecs::ISystem.
Definition at line 24 of file EnemyAISystem.cpp.
References _registry, _time, rtp::net::Boss, rtp::net::BossShield, rtp::ecs::components::Circular, rtp::ecs::Registry::get(), rtp::ecs::components::Kamikaze, rtp::ecs::NullEntity, rtp::net::Player, rtp::net::Scout, rtp::ecs::components::SineWave, rtp::ecs::components::Static, rtp::ecs::components::StraightLine, rtp::net::Tank, rtp::Vec2< T >::x, rtp::Vec2< T >::y, rtp::ecs::components::ZigZag, and rtp::ecs::Registry::zipView().
|
private |
Reference to the entity registry.
Definition at line 43 of file EnemyAISystem.hpp.
Referenced by update().
|
private |
Elapsed time for AI calculations.
Definition at line 44 of file EnemyAISystem.hpp.
Referenced by update().