From fc921cc9006b241d4e76643ee4428fe4783cd856 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerard=20Gasc=C3=B3n?= Date: Fri, 4 Apr 2025 17:03:55 +0200 Subject: [PATCH] feat: when dragging a dragon rethink the path --- scenes/window/dragon.gd | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scenes/window/dragon.gd b/scenes/window/dragon.gd index 83c70b1..bd06503 100644 --- a/scenes/window/dragon.gd +++ b/scenes/window/dragon.gd @@ -26,6 +26,7 @@ func _ready() -> void: func _process(delta: float) -> void: if draggable.dragging: _actual_position = position + _walking = false return if not _walking: @@ -33,6 +34,7 @@ func _process(delta: float) -> void: _thinking_path = true await get_tree().create_timer(rng.randf_range(2, 7)).timeout _pick_random_screen_position() + return _move_to_target(delta)