Add actions
This commit is contained in:
13
game/systems_ai.c
Normal file
13
game/systems_ai.c
Normal file
@@ -0,0 +1,13 @@
|
||||
#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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user