Files
BeastBound/scripts/game.gd
2024-10-26 13:51:02 +02:00

16 lines
268 B
GDScript

extends Node2D
func spawn_mob():
var new_mob = preload("res://scenes/enemy.tscn").instantiate()
%PathFollow2D.progress_ratio = randf()
new_mob.global_position = %PathFollow2D.global_position
add_child(new_mob)
func _on_timer_timeout() -> void:
spawn_mob()