feat: added get_eye_transform to unit

This commit is contained in:
Sara 2024-06-19 12:56:02 +02:00
parent 3c75b592d3
commit bcf1672f01
2 changed files with 6 additions and 0 deletions

View file

@ -43,6 +43,10 @@ UnitWorldState *Unit::get_world_state() const {
return this->world_state;
}
gd::Transform3D Unit::get_eye_transform() const {
return this->eyes->get_global_transform();
}
void Unit::destroy_state() {
if(this->state == nullptr || this->state->is_queued_for_deletion() || !this->state->is_inside_tree())
return;

View file

@ -23,7 +23,9 @@ public:
void stop_plan();
void plan_for_marker(GoalMarker *marker);
void plan_for_goal(gd::Ref<goap::Goal> goal);
UnitWorldState *get_world_state() const;
gd::Transform3D get_eye_transform() const;
private:
void destroy_state();
void state_finished();