Add weapons
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user