Handles enemy damage and health. More...
Functions | |
| void | Enemy_TakeDamage (EnemyData *enemy, int damage) |
| [Utility] Applies damage to an enemy | |
| void | Enemy_CreateHealthText (Vec2 position, int damage) |
| void | Enemy_UpdateHealthTexts () |
| void | Enemy_RenderHealthTexts () |
Variables | |
| UIElement * | EnemyHealthTexts [ENEMY_MAX *10] = {NULL} |
Handles enemy damage and health.
Implements the damage processing system for enemies, including health reduction and death checks.
| void Enemy_CreateHealthText | ( | Vec2 | position, |
| int | damage | ||
| ) |
| void Enemy_RenderHealthTexts | ( | ) |
| void Enemy_TakeDamage | ( | EnemyData * | enemy, |
| int | damage | ||
| ) |
[Utility] Applies damage to an enemy
Reduces an enemy's health based on the damage amount. Enemies with 0 or less health after damage will be marked for death processing.
| enemy | Pointer to the enemy to damage |
| damage | Amount of damage to apply |
| void Enemy_UpdateHealthTexts | ( | ) |