extends Node2D
onready var timer = $Timer
var sopel = preload("res://Sopel.tscn")
var number = 1
func spawn_icicle() :
if get_parent().score>0:
if get_parent().score%10 == 0:
timer.wait_time -= 0.1
if get_parent().score%100 == 0:
number += 1
for i in number:
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")
func _ready():
pass # Replace with function body.
func _on_Timer_timeout():
spawn_icicle()