|
R-Type
Distributed multiplayer game engine in C++
|
System managing enemy AI behavior and attack patterns. More...
#include <AISystem.hpp>


Public Member Functions | |
| AISystem ()=default | |
| Default constructor. | |
| ~AISystem () override=default | |
| Default destructor. | |
| void | update (Registry ®istry, float deltaTime) override |
| Updates all enemy AI behaviors. | |
| ComponentMask | getComponentMask () const override |
| Gets the component mask for this system. | |
Public Member Functions inherited from ecs::ISystem | |
| virtual | ~ISystem ()=default |
| Virtual destructor. | |
Private Member Functions | |
| void | applyMovementPattern (const Enemy &enemy, Transform &transform, Velocity &velocity, float deltaTime) |
| Applies movement pattern to an enemy entity. | |
System managing enemy AI behavior and attack patterns.
Controls enemy movement patterns and attack behaviors. Requires Enemy, Transform and Velocity components.
Definition at line 23 of file AISystem.hpp.
|
default |
Default constructor.
|
overridedefault |
Default destructor.
|
private |
Applies movement pattern to an enemy entity.
Applies specific movement patterns based on enemy type.
| enemy | Enemy component containing pattern information |
| transform | Transform component for position data |
| velocity | Velocity component to modify |
| deltaTime | Time elapsed since last frame (in seconds) |
Definition at line 38 of file AISystem.cpp.
Referenced by update().
|
overridevirtual |
Gets the component mask for this system.
Implements ecs::ISystem.
Definition at line 45 of file AISystem.cpp.
Referenced by update().
|
overridevirtual |
Updates all enemy AI behaviors.
Updates all enemy AI behaviors for the current frame.
Processes each enemy entity and applies movement patterns based on their attack pattern type.
| registry | Reference to the ECS registry |
| deltaTime | Time elapsed since last frame (in seconds) |
Implements ecs::ISystem.
Definition at line 17 of file AISystem.cpp.
References applyMovementPattern(), ecs::Registry::getComponent(), getComponentMask(), ecs::Registry::getEntitiesWithMask(), ecs::Registry::hasComponent(), and ecs::Weapon::setShouldShoot().
