summaryrefslogtreecommitdiff
path: root/engine-ocean/Game/Systems/AI/aibehaviorcomponent.h
blob: 5a86b88a7bd7719702e872019dea1e89b060e37f (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
#ifndef AIBEHAVIORCOMPONENT_H
#define AIBEHAVIORCOMPONENT_H


#include "Game/Components/Component.h"
#include "Game/Systems/AI/btselector.h"
#include "Game/Systems/aisystem.h"
#include <map>
#include <string>
class AIBehaviorComponent : public Component
{
public:
    AIBehaviorComponent(std::string entity_id,
                        std::map<std::string, BlackboardData>& global_blackboard);
    ~AIBehaviorComponent();
    void update(float seconds);

private:
    void makeBehaviorTree();

    std::string m_entity_id;
    std::map<std::string, BlackboardData>& m_global_blackboard;
    BTNode *m_root = 0;
    Status m_status = Status::SUCCESS;
};

#endif // AIBEHAVIORCOMPONENT_H