DuckRun/scenes/Wolke/Spawner/wolken_spawner.gd
2024-10-01 15:56:30 +02:00

13 lines
291 B
GDScript

extends Marker2D
var speed
func _ready() -> void:
speed = $"/root/Global".speed
func _spawn() -> void:
var wolke = preload("res://scenes/Wolke/wolke.tscn").instantiate()
wolke.global_position.y = randi_range(0,50)
$"../WolkenTimer".wait_time = randf_range(0.5,1.5)
add_child(wolke)