Fix and integrate BT
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "entity_factory.h"
|
||||
#include "unit_actions.h"
|
||||
|
||||
#include "ai_actions.h"
|
||||
|
||||
ecs_entity_t entityCreateEmpty() {
|
||||
ecs_entity_t e = ecs_new_id(ECS);
|
||||
@@ -35,7 +36,11 @@ ecs_entity_t entityCreateWorker(const Position position, Game *game) {
|
||||
.curFrame = 0,
|
||||
.elapsed = 0.0f,
|
||||
});
|
||||
ecs_set(ECS, e, UnitAction, { NULL, NULL });
|
||||
ecs_set(ECS, e, BzBTState, {
|
||||
.root = NULL,
|
||||
.nodeStatePool = game->pools.btNodeState
|
||||
});
|
||||
ecs_set(ECS, e, AIBlackboard, {.entity = e});
|
||||
ecs_add_id(ECS, e, Selectable);
|
||||
ecs_set(ECS, e, Unit, {
|
||||
.acceleration = 80.0f,
|
||||
|
||||
Reference in New Issue
Block a user