2025-05-19 15:52:30 +00:00
|
|
|
extends Area2D
|
|
|
|
|
2025-05-20 12:43:47 +00:00
|
|
|
var planetTwo = preload("res://planets/planetTwo/planetTwo.tscn")
|
2025-05-19 15:52:30 +00:00
|
|
|
var activated: bool = false
|
|
|
|
|
|
|
|
func _ready() -> void:
|
|
|
|
var scoreBar = get_tree().root.find_child("ProgressBar", true, false)
|
|
|
|
scoreBar.connect("complete", Callable(self, "levelComplete"))
|
|
|
|
|
|
|
|
func levelComplete():
|
|
|
|
activated = true
|
|
|
|
print("exit active")
|
|
|
|
|
|
|
|
func _on_body_entered(body: Node2D) -> void:
|
|
|
|
if activated:
|
2025-05-20 12:43:47 +00:00
|
|
|
get_tree().change_scene_to_packed(planetTwo)
|