Operation Null Mind 0.4.1
A 2D roguelike top down shooter game made with SDL2
 
Loading...
Searching...
No Matches
enemy_manager.c File Reference

Manages enemy spawning and room encounters. More...

#include <enemy.h>
#include <maps.h>
#include <enemy_types.h>
#include <player.h>
#include <time_system.h>
#include <random.h>

Functions

int EnemyManage_CountEnemyInChunk (EnvironmentChunk *chunk)
 [Utility] Counts the number of active enemies in a specific chunk
 
void EnemyManager_Update ()
 [PostUpdate] Updates the enemy management system
 
void EnemyManager_RenderClearText ()
 

Variables

float currentClearTextAlpha = 0
 

Detailed Description

Manages enemy spawning and room encounters.

Handles room-based enemy spawning, wave generation, and combat state transitions for the player.

Author
Mango
Date
2025-03-05

Function Documentation

◆ EnemyManage_CountEnemyInChunk()

int EnemyManage_CountEnemyInChunk ( EnvironmentChunk *  chunk)

[Utility] Counts the number of active enemies in a specific chunk

Parameters
chunkPointer to the chunk to check
Returns
int Number of active enemies in the chunk

◆ EnemyManager_RenderClearText()

void EnemyManager_RenderClearText ( )

◆ EnemyManager_Update()

void EnemyManager_Update ( )

[PostUpdate] Updates the enemy management system

Handles enemy spawning, despawning, and room transitions. Manages which enemies are active based on player position.

Todo:
[enemy_manager.c:87] Add enemy spawning sfx here (Aka the red [+] thing appearing)

Variable Documentation

◆ currentClearTextAlpha

float currentClearTextAlpha = 0