diff options
Diffstat (limited to 'src/libjin/ai/je_behavior_tree.h')
-rw-r--r-- | src/libjin/ai/je_behavior_tree.h | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/src/libjin/ai/je_behavior_tree.h b/src/libjin/ai/je_behavior_tree.h index 8621696..173df80 100644 --- a/src/libjin/ai/je_behavior_tree.h +++ b/src/libjin/ai/je_behavior_tree.h @@ -4,19 +4,54 @@ #include "../core/je_configuration.h" #if defined(jin_ai) +#include <functional> + namespace JinEngine { namespace AI { - + /// /// /// class BehaviorTree { + public: + BehaviorTree(void* userData) : mUserData(userData){} + + class Node + { + public: + enum Type + { + + }; + + enum Status + { + Running, + Success, + Failure + }; + + Status status; + }; + + typedef std::function<Node::Status(void*)> UpdateCallback; + + Node makeNode(Node::Type type, UpdateCallback callback); + + private: + + /// + /// + /// + void* const mUserData; }; + typedef BehaviorTree::Node::Status BahaviorNodeStatus; + } // namespace AI } // namespace JinEngine |