Files
PixelDefense/game/systems_ai.c
2023-12-17 09:06:14 +01:00

14 lines
348 B
C

#include "systems.h"
#include "game_state.h"
void updateUnitActions(ecs_iter_t *it) {
Game *game = ecs_singleton_get_mut(ECS, Game);
UnitAction *action = ecs_field(it, UnitAction, 1);
for (i32 i = 0; i < it->count; i++) {
ecs_entity_t entity = it->entities[i];
handleAction(entity, &action[i], game);
}
}