System żyć - Game Label
TaktycznyBocian
plain_text
2 years ago
354 B
3
Indexable
extends Node2D var lives = 4 var seconds = 0 func _on_Fail_body_entered(body): if body.is_in_group("Ball"): lives -= 1 get_node("Live").set_text("Lives: " + str(lives)) if lives == 0: get_tree().change_scene("res://UI/GameOver.tscn") func _on_Timer_timeout(): seconds += 1 get_node('Time').set_text('Time: ' + str(seconds))
Editor is loading...