Add weapons

This commit is contained in:
2024-01-06 19:54:22 +01:00
parent dbc0ce5981
commit f667614cfe
398 changed files with 1209 additions and 66 deletions

View File

@@ -124,7 +124,12 @@ void inputUnitAction(Game *game, InputState *input) {
while (ecs_iter_next(&it)) {
for (i32 i = 0; i < it.count; i++) {
const ecs_entity_t entity = it.entities[i];
entitySetPath(entity, target, game);
clearActions(entity, game);
addAction(entity, game, &(const Action) {
.type = ACTION_MOVE_TO,
.as.moveTo.target = target,
.as.moveTo.proximityThreshold = 6.0f,
});
}
}
ecs_defer_end(ECS);