28 lines
700 B
GDScript
28 lines
700 B
GDScript
extends Node2D
|
|
|
|
|
|
func _ready() -> void:
|
|
$YSort/Player.load_hud($HUD)
|
|
return
|
|
|
|
|
|
func _on_activate_boss_teleporter_body_entered(body: Node) -> void:
|
|
$'Interactables/Boss Teleporter'.set_deferred('visible', true)
|
|
$'Interactables/Activate Boss Teleporter'.call_deferred('queue_free')
|
|
return
|
|
|
|
|
|
func _on_eyeball_boss_death() -> void:
|
|
$YSort/Enemies.call_deferred('queue_free')
|
|
$Lights.call_deferred('queue_free')
|
|
$Darkness.set_visible(false)
|
|
$Ending.start()
|
|
return
|
|
|
|
|
|
func _on_ending_timeout():
|
|
if get_tree().change_scene('res://GUI/Level Complete.tscn') != OK:
|
|
print('ERROR: Level 5 failed to change scene to Level Complete.')
|
|
queue_free()
|
|
return
|