Floppy_Bort/scenes/background/cloud_spawner.gd

10 lines
237 B
GDScript3
Raw Permalink Normal View History

2025-02-11 19:47:33 +01:00
extends Marker2D
const cloud = preload("res://scenes/cloud/cloud.tscn")
func _on_spawn_timeout() -> void:
var instance = cloud.instantiate()
instance.global_position = Vector2(0,randi_range(0,600))
$"../clouds".add_child(instance)