Fix and integrate BT

This commit is contained in:
2024-01-10 14:42:21 +01:00
parent a9d20cb7f9
commit 3ba5c8932b
16 changed files with 551 additions and 109 deletions

View File

@@ -4,6 +4,7 @@
#include <flecs.h>
#include "../components.h"
#include "../ai_actions.h"
typedef struct Game Game;
@@ -19,22 +20,12 @@ bool entitySetPath(const ecs_entity_t entity, const Vector2 target, Game *game);
/*
* 0: Game (singleton)
* 1: UnitAction
* 1: BzBTState
*/
void handleUnitActionsSystem(ecs_iter_t *it);
void updateAISystem(ecs_iter_t *it);
/*
* 0: Game (singleton)
* 1: UnitAI
* 2: UnitAction
*/
void updateUnitAISystem(ecs_iter_t *it);
/*
* 0: Game (singleton)
* 1: UnitAction
*/
void updateUnitActionsSystem(ecs_iter_t *it);
void setAIBehaviour(ecs_entity_t entity, const BzBTNode *root,
const AIBlackboard *blackboard);
/**********************************