bovido/scripts/enemy/behavior_tree/throw_ball_action.gd

15 lines
308 B
GDScript

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()