bovido/scripts/enemy/behavior_tree/get_ball_destination_action.gd
Mathilde Grapin e0633efcbe Play ball with the enemy
Enemy can return the ball to the player
2023-06-27 21:25:32 +02:00

14 lines
405 B
GDScript

class_name GetBallDestinationAction
extends ActionLeaf
func tick(actor: Node, blackboard: Blackboard):
# var rand_cell: Vector2i = actor.tile_map.get_random_top_cell()
# actor.tile_map.reset_and_set_destination_cell(rand_cell)
#
# var destination = actor.tile_map.map_to_local(rand_cell)
# destination.y += actor.Y_SPAWN_OFFSET
#
blackboard.set_value("destination", actor.next_target)
return SUCCESS