World 1 Game Extended
Kandif
plain_text
2 years ago
541 B
77
Indexable
extends Node2D var score = 0 func sopel_kolizja(body,sopelek): if body is StaticBody2D: score += 1 $Control/Label.text = str(score) sopelek.queue_free() if body is KinematicBody2D: $SopelGenerator/Timer.stop() $Control/Button.visible = true $Control/Button.text = "Restart" for sopel in $SopelGenerator.get_children(): if sopel is Node2D: sopel.queue_free() func _on_Button_pressed(): score = 0 $Control/Label.text = str(score) $SopelGenerator/Timer.start() $Control/Button.visible = false
Editor is loading...