viscosity/modules/behaviour_nodes/behaviour_tree.h

24 lines
444 B
C++

#pragma once
#include "macros.h"
#include "scene/main/node.h"
class BehaviourTree : public Node {
GDCLASS(BehaviourTree, Node);
static void _bind_methods();
void process();
protected:
void _notification(int what);
public:
bool execute_next();
private:
class BehaviourNode *current{ nullptr };
class BehaviourNode *root{ nullptr };
public:
GET_SET_FNS(class BehaviourNode *, current);
GET_SET_FNS(class BehaviourNode *, root);
};