22 lines
602 B
C++
22 lines
602 B
C++
#include "goal_marker.hpp"
|
|
#include "utils/godot_macros.hpp"
|
|
#include <godot_cpp/classes/global_constants.hpp>
|
|
#include <godot_cpp/classes/node.hpp>
|
|
|
|
void GoalMarker::_bind_methods() {
|
|
#define CLASSNAME GoalMarker
|
|
GDPROPERTY_HINTED(goal, gd::Variant::OBJECT, gd::PROPERTY_HINT_RESOURCE_TYPE, "Goal");
|
|
}
|
|
|
|
void GoalMarker::destroy_on_forgotten() {
|
|
callable_mp(gd::Object::cast_to<gd::Node>(this), &gd::Node::queue_free).call_deferred();
|
|
}
|
|
|
|
void GoalMarker::set_goal(gd::Ref<goap::Goal> goal) {
|
|
this->goal = goal;
|
|
}
|
|
|
|
gd::Ref<goap::Goal> GoalMarker::get_goal() const {
|
|
return this->goal;
|
|
}
|