DuckRun/scenes/Wolke/Spawner/wolken_spawner.gd

13 lines
285 B
GDScript3
Raw Normal View History

2024-10-01 15:56:30 +02:00
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)
2024-10-01 15:56:30 +02:00
add_child(wolke)