18 lines
381 B
GDScript
18 lines
381 B
GDScript
extends Node2D
|
|
|
|
var death_count: int = 0
|
|
|
|
|
|
func _ready() -> void:
|
|
$YSort/Player.load_hud($HUD)
|
|
return
|
|
|
|
|
|
func _on_dark_matter_death() -> void:
|
|
death_count += 1
|
|
if death_count == 5:
|
|
if get_tree().change_scene('res://GUI/Level Complete.tscn') != OK:
|
|
print('ERROR: Level 1 failed to change scene to Level Complete.')
|
|
queue_free()
|
|
return
|