Added win condition for level 1 and added boss fight for level 5
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
extends Node2D
|
||||
|
||||
|
||||
# Declare member variables here. Examples:
|
||||
# var a = 2
|
||||
# var b = "text"
|
||||
var death_count: int = 0
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
$YSort/Player.load_hud($HUD)
|
||||
return
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
#func _process(delta):
|
||||
# pass
|
||||
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
|
||||
|
Reference in New Issue
Block a user