feat: added get_eye_transform to unit
This commit is contained in:
parent
3c75b592d3
commit
bcf1672f01
|
@ -43,6 +43,10 @@ UnitWorldState *Unit::get_world_state() const {
|
||||||
return this->world_state;
|
return this->world_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gd::Transform3D Unit::get_eye_transform() const {
|
||||||
|
return this->eyes->get_global_transform();
|
||||||
|
}
|
||||||
|
|
||||||
void Unit::destroy_state() {
|
void Unit::destroy_state() {
|
||||||
if(this->state == nullptr || this->state->is_queued_for_deletion() || !this->state->is_inside_tree())
|
if(this->state == nullptr || this->state->is_queued_for_deletion() || !this->state->is_inside_tree())
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -23,7 +23,9 @@ public:
|
||||||
void stop_plan();
|
void stop_plan();
|
||||||
void plan_for_marker(GoalMarker *marker);
|
void plan_for_marker(GoalMarker *marker);
|
||||||
void plan_for_goal(gd::Ref<goap::Goal> goal);
|
void plan_for_goal(gd::Ref<goap::Goal> goal);
|
||||||
|
|
||||||
UnitWorldState *get_world_state() const;
|
UnitWorldState *get_world_state() const;
|
||||||
|
gd::Transform3D get_eye_transform() const;
|
||||||
private:
|
private:
|
||||||
void destroy_state();
|
void destroy_state();
|
||||||
void state_finished();
|
void state_finished();
|
||||||
|
|
Loading…
Reference in a new issue