dungeon/src/BehaviourTree.h

25 lines
440 B
C
Raw Normal View History

2017-09-17 13:43:13 +02:00
#pragma once
#include <vector>
class BehaviourTree;
class BehaviourTreeNode;
class Actor;
2018-01-09 21:59:05 +01:00
class Tilemap;
2017-09-17 13:43:13 +02:00
struct BTTick {
Actor* target;
2018-01-09 21:59:05 +01:00
Tilemap* map;
2017-09-17 13:43:13 +02:00
BehaviourTree* tree;
std::vector<BehaviourTreeNode*> openNodes;
};
class BehaviourTree {
BehaviourTreeNode* root;
BTTick lasttick;
public:
BehaviourTree(BehaviourTreeNode* rootNode);
~BehaviourTree();
2018-01-09 21:59:05 +01:00
void tick(Actor* target, Tilemap* map);
2017-09-17 13:43:13 +02:00
};