diff options
author | chai <chaifix@163.com> | 2019-01-12 21:48:33 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-01-12 21:48:33 +0800 |
commit | 8b00d67febf133e89f6a0bfabc41feed555dc4a9 (patch) | |
tree | fe48ef17c250afa40c2588300fcdb5920dba6951 /src/libjin/ai/behavior_tree.h | |
parent | a907c39756ef6b368d06643afa491c49a9044a8e (diff) |
*去掉文件前缀je_
Diffstat (limited to 'src/libjin/ai/behavior_tree.h')
-rw-r--r-- | src/libjin/ai/behavior_tree.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/src/libjin/ai/behavior_tree.h b/src/libjin/ai/behavior_tree.h new file mode 100644 index 0000000..eb36e9f --- /dev/null +++ b/src/libjin/ai/behavior_tree.h @@ -0,0 +1,60 @@ +#ifndef __JE_BEHAVIOR_TREE_H__ +#define __JE_BEHAVIOR_TREE_H__ + +#include "../core/configuration.h" +#if defined(jin_ai) + +#include <functional> + +namespace JinEngine +{ + namespace AI + { + + /// + /// + /// + class BehaviorTree : public Object + { + public: + BehaviorTree(void* userData) : mUserData(userData){} + + class Node : public Object + { + 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 + +#endif // jin_ai + +#endif
\ No newline at end of file |