1
Fork 0
mirror of https://github.com/Steffo99/hella-farm.git synced 2024-11-21 15:44:23 +00:00

Prevent softlock at start of game

This commit is contained in:
Steffo 2024-05-03 02:45:17 +02:00
parent 566ff4d00a
commit 200b40db80
Signed by: steffo
GPG key ID: 5ADA3868646C3FC0

View file

@ -29,3 +29,8 @@ func _on_move(movement: Vector2) -> void:
func _physics_process(delta: float) -> void:
if move_towards.target != null:
move_towards.speed *= pow(speed_up_factor, delta)
func _on_delete_if_not_on_screen_screen_exited() -> void:
if move_towards.target == null:
queue_free()