Generator + icicle

Kandif avatar
Kandif
plain_text
02/06/2023 1:45 PM
408 B
29
Indexable
extends Node2D

var sopel = preload("res://Sopel.tscn")

func spawn_icicle():
	var icicle = sopel.instance()
	add_child(icicle)
	icicle.position.x = rand_range(0,1000)
	icicle.get_node("RigidBody2D").connect("body_entered",get_parent(),"sopel_kolizja",[icicle])

func _on_Timer_timeout():
	spawn_icicle()
Editor is loading...