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:
|
func _process(delta: float) -> void:
|
||||||
if draggable.dragging:
|
if draggable.dragging:
|
||||||
_actual_position = position
|
_actual_position = position
|
||||||
|
_walking = false
|
||||||
return
|
return
|
||||||
|
|
||||||
if not _walking:
|
if not _walking:
|
||||||
|
@ -33,6 +34,7 @@ func _process(delta: float) -> void:
|
||||||
_thinking_path = true
|
_thinking_path = true
|
||||||
await get_tree().create_timer(rng.randf_range(2, 7)).timeout
|
await get_tree().create_timer(rng.randf_range(2, 7)).timeout
|
||||||
_pick_random_screen_position()
|
_pick_random_screen_position()
|
||||||
|
return
|
||||||
|
|
||||||
_move_to_target(delta)
|
_move_to_target(delta)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue