Implements update logic for Sentry enemy type. More...
#include <enemy_sentry.h>#include <player.h>#include <time_system.h>#include <random.h>#include <circle.h>#include <math.h>Functions | |
| void | Sentry_UpdateGun (EnemyData *data) |
| Updates the gun position and orientation for the Sentry enemy. | |
| void | Sentry_UpdateLazer (EnemyData *data) |
| Updates the laser targeting system for the Sentry enemy. | |
| void | Sentry_Update (EnemyData *data) |
| [PostUpdate] Updates the Sentry enemy's state and behavior | |
| void | Sentry_UpdateParticles () |
| Updates all particle emitters related to the Sentry enemy. | |
Implements update logic for Sentry enemy type.
Contains the AI behavior and state updates for the Sentry enemy.
| void Sentry_Update | ( | EnemyData * | data | ) |
[PostUpdate] Updates the Sentry enemy's state and behavior
Handles the state machine for the Sentry enemy, including idle, aiming, and shooting states. The Sentry enemy uses a laser-based weapon that sweeps across an area after targeting.
| data | Pointer to the enemy data structure |
| void Sentry_UpdateGun | ( | EnemyData * | data | ) |
Updates the gun position and orientation for the Sentry enemy.
Calculates the gun position, rotation, and orientation based on the enemy's position and the player's location. Also updates associated particle emitters for muzzle flash and bullet casings.
| data | Pointer to the enemy data structure |
| void Sentry_UpdateLazer | ( | EnemyData * | data | ) |
Updates the laser targeting system for the Sentry enemy.
Calculates the laser beam's path from the gun to the first obstacle or player, performing collision detection and damage application when in shooting state. The laser acts as both a visual cue and combat mechanic.
| data | Pointer to the enemy data structure |
| void Sentry_UpdateParticles | ( | ) |
Updates all particle emitters related to the Sentry enemy.
Processes particle physics, collision detection, and damage calculation for bullets fired by the Sentry enemy. Also handles visual effects such as muzzle flash, bullet casings, and bullet impact fragments.