bovido/scripts/enemy/behavior_tree/throw_ball_action.gd

15 lines
308 B
GDScript3
Raw Normal View History

class_name ThrowBallAction
extends ActionLeaf
func before_run(actor, _blackboard):
2023-07-01 13:26:45 +02:00
actor.play_hit_ball_animation()
func tick(actor, _blackboard):
2023-07-01 13:26:45 +02:00
if !actor.hit_ball_animation_finished:
return RUNNING
2023-07-01 13:26:45 +02:00
actor.throw_ball()
return SUCCESS
func after_run(actor, _blackboard):
2023-07-01 13:26:45 +02:00
actor.play_idle_animation()