Skip to content

Commit

Permalink
hubero_core - Actor: added transition handlers to setup animation (ly…
Browse files Browse the repository at this point in the history
…ing, sit down, sitting, stand up)
  • Loading branch information
rayvburn committed Feb 20, 2022
1 parent 5d9dc9d commit beb2b30
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hubero_core/include/hubero_core/actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ class Actor {
void thSetupAnimationWalk();
void thSetupAnimationStand();
void thSetupAnimationLieDown();
void thSetupAnimationLying();
void thSetupAnimationSitDown();
void thSetupAnimationSitting();
void thSetupAnimationStandUp();

/// @}

Expand Down
16 changes: 16 additions & 0 deletions hubero_core/src/actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,22 @@ void Actor::thSetupAnimationLieDown() {
animation_control_ptr_->start(AnimationType::ANIMATION_LIE_DOWN, mem_.getTimeCurrent());
}

void Actor::thSetupAnimationLying() {
animation_control_ptr_->start(AnimationType::ANIMATION_LYING, mem_.getTimeCurrent());
}

void Actor::thSetupAnimationSitDown() {
animation_control_ptr_->start(AnimationType::ANIMATION_SIT_DOWN, mem_.getTimeCurrent());
}

void Actor::thSetupAnimationSitting() {
animation_control_ptr_->start(AnimationType::ANIMATION_SITTING, mem_.getTimeCurrent());
}

void Actor::thSetupAnimationStandUp() {
animation_control_ptr_->start(AnimationType::ANIMATION_STAND_UP, mem_.getTimeCurrent());
}

void Actor::updateFsmSuper() {
EventFsmSuper event {};
event.follow_object = TaskPredicates(*task_follow_object_ptr_);
Expand Down

0 comments on commit beb2b30

Please sign in to comment.