Add chase/evade behaviour

This commit is contained in:
2024-02-13 18:27:53 +01:00
parent e6ddafd3e2
commit 24abf94faa
8 changed files with 189 additions and 59 deletions

View File

@@ -377,7 +377,7 @@ void loadMap(Game *game, const char *path, bool mainMenu) {
if (nearest.entity == 0) continue;
ResourceType resType = ecs_get(ECS, nearest.entity, Resource)->type;
setAIBehaviour(workers[i].entity, game->BTs.workerHarvest, &(AIBlackboard) {
setAIBehaviour(workers[i].entity, game->BTs.worker, &(AIBlackboard) {
.as.worker = {
.harvestType = resType,
.harvestTarget = nearest.entity,