Untitled
unknown
plain_text
2 years ago
575 B
32
Indexable
Never
extends Node2D var score = 0 var game_over = false func sopel_kolizja(body): if body.name == "Ground": score += 1 $Control/Label.text = str(score) if body.name == "Player": $GeneratorSopli/Timer.stop() $Control/Button.visible = true $Control/Button.text = "Restart" for sopel in $GeneratorSopli.get_children(): if sopel is Node2D: sopel.queue_free() func _on_Button_pressed(): score = 0 $Control/Label.text = str(score) $GeneratorSopli/Timer.start() $Control/Button.visible = false pass # Replace with function body.