feat: when dragging a dragon rethink the path
This commit is contained in:
parent
014cf47823
commit
fc921cc900
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue