bovido/scripts/enemy/behavior_tree/throw_ball_action.gd
2023-07-01 13:26:45 +02:00

15 lines
307 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()