Lekcja3 - Main - World
TaktycznyBocian
plain_text
3 years ago
554 B
16
Indexable
extends Node2D var score func game_over(): # funkcja do przegrywania $ScoreTimer.stop() $IcicleSpawner.stop() $HUD.show_game_over(score) get_tree().call_group("icicle", "queue_free") func new_game(): # funkcja do nowej gry score = 0 $HUD/ScoreLabel.show() $Player.start($StartPosition.position) $StartTimer.start() $HUD.update_score(score) $HUD.show_message("Get Ready") $IcicleSpawner.start() func _on_StartTimer_timeout(): $ScoreTimer.start() func _on_ScoreTimer_timeout(): score += 1 $HUD.update_score(score)
Editor is loading...