#ifndef GOAP_STATE_HPP
#define GOAP_STATE_HPP

#include "goap/actor_world_state.hpp"
#include <godot_cpp/classes/node.hpp>
#include <godot_cpp/classes/node3d.hpp>

namespace gd = godot;

namespace goap {
class Action;

class State : public gd::Node {
friend class Action;
    GDCLASS(State, gd::Node);
    static void _bind_methods();
public:
    virtual void _enter_tree() override;
    virtual void _process(double delta_time) override;
protected:
    Action const *get_action() const;
    virtual void _end_state();
    void end_state();
private:
    ActorWorldState *world_state{nullptr};
    Action const *action{nullptr};
};
}

#endif // !GOAP_STATE_HPP
