feat: renamed get_target_dead to get_is_target_dead

This commit is contained in:
Sara 2024-06-19 10:59:19 +02:00
parent f940072312
commit a946f7f39b
2 changed files with 4 additions and 4 deletions

View file

@ -11,7 +11,7 @@ void UnitWorldState::_bind_methods() {
#define CLASSNAME UnitWorldState
GDSIGNAL("attention_changed");
GDFUNCTION(get_can_see_target);
GDFUNCTION(get_target_dead);
GDFUNCTION(get_is_target_dead);
GDFUNCTION(get_is_at_target);
GDFUNCTION(get_target_node);
}
@ -38,7 +38,7 @@ bool UnitWorldState::get_is_at_target() const {
return (target - current).length_squared() < min_dist * min_dist;
}
bool UnitWorldState::get_target_dead() const {
bool UnitWorldState::get_is_target_dead() const {
return false;
}

View file

@ -2,7 +2,7 @@
#define UNIT_WORLD_STATE_HPP
#include "goap/actor_world_state.hpp"
#include "godot_cpp/classes/navigation_agent3d.hpp"
#include <godot_cpp/classes/navigation_agent3d.hpp>
#include <godot_cpp/classes/node3d.hpp>
class Unit;
@ -14,7 +14,7 @@ public:
virtual void _enter_tree() override;
bool get_can_see_target() const;
bool get_is_at_target() const;
bool get_target_dead() const;
bool get_is_target_dead() const;
void set_target_node(gd::Node3D *node);
gd::Node3D *get_target_node() const;