Implements update logic for Vantage enemy type. More...
#include <enemy_vantage.h>#include <player.h>#include <time_system.h>#include <random.h>#include <circle.h>#include <math.h>Functions | |
| void | Vantage_UpdateGun (EnemyData *data) |
| Updates the gun position and orientation for the Vantage enemy. | |
| void | Vantage_Update (EnemyData *data) |
| [PostUpdate] Updates the Vantage enemy's state | |
| void | Vantage_UpdateParticles () |
| Updates all particle emitters related to the Vantage enemy. | |
| void | Vantage_UpdateLazer (EnemyData *data) |
| Updates the laser targeting system for the Vantage enemy. | |
Implements update logic for Vantage enemy type.
Contains the AI behavior and state updates for the Vantage enemy.
| void Vantage_Update | ( | EnemyData * | data | ) |
[PostUpdate] Updates the Vantage enemy's state
This function is called each frame to update the Vantage enemy's behavior. The Vantage enemy is a long-range sniper that can detect the player from far away.
| data | Pointer to the enemy data structure |
| void Vantage_UpdateGun | ( | EnemyData * | data | ) |
Updates the gun position and orientation for the Vantage 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 Vantage_UpdateLazer | ( | EnemyData * | data | ) |
Updates the laser targeting system for the Vantage enemy.
Calculates the laser beam's path from the gun to the first obstacle or player, handling collision detection and damage application. The laser is used for both visualization (showing where the Vantage is aiming) and for dealing damage when in shooting state.
| data | Pointer to the enemy data structure |
| void Vantage_UpdateParticles | ( | ) |
Updates all particle emitters related to the Vantage enemy.
Handles particle physics, collision detection, and damage calculation for bullets fired by the Vantage enemy. This function should be called once per frame to properly update and render all Vantage-specific particles.