aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/ai/behavior_tree.h
blob: eb36e9f8fd25d6866231534a9197f266471d0064 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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