summaryrefslogtreecommitdiff
path: root/engine-ocean/Game/Systems/AI/Actions/walkaction.h
blob: 2e2486495d7785f63a9b39a23fb05f9412b261a0 (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
#ifndef WALKACTION_H
#define WALKACTION_H
#include "Game/Components/TransformComponent.h"
#include "Game/GameObjects/GameObject.h"
#include "Game/Systems/AI/btnode.h"
#include "glm/fwd.hpp"
#include <memory>
#include "btaction.h"

class WalkAction : public BTNode
{
public:
    WalkAction(std::string entity_id, std::map<std::string, BlackboardData>& global_blackboard);
    Status update(float seconds) override;
    void reset() override;
    void setPath(glm::vec3 entity_pos);
    void addChildren(BTNode *node) override;



private:
    std::vector<glm::vec3> m_path;
    glm::vec3 m_destination;
    std::map<std::string, BlackboardData>& m_global_blackboard;
    std::string m_entity_id;
};


#endif // WALKACTION_H