class_name ThrowBallAction extends ActionLeaf func before_run(actor, _blackboard): actor.play_hit_ball_animation() func tick(actor, _blackboard): if !actor.hit_ball_animation_finished: return RUNNING actor.throw_ball() return SUCCESS func after_run(actor, _blackboard): actor.play_idle_animation()