This commit is contained in:
Bryce
2026-02-21 07:55:11 -08:00
parent 8b50530081
commit f8c9495338
59 changed files with 1076 additions and 85 deletions

View File

@@ -1,6 +1,6 @@
extends "res://SetPiece_.gd"
@export var target_transition: String
@export var appear_at_node: String
@export_file("*.tscn") var target
# Called when the node enters the scene tree for the first time.
func _ready():
@@ -14,6 +14,6 @@ func _process(delta):
func default_script(scene: Scene):
var path = NavigationServer2D.map_get_path(scene.map, scene.pathfind.to_local(scene.ego.global_position), scene.pathfind.to_local($"exit".global_position), true)
scene.start_main_script(scene.ScriptBuilder.init(scene.ScriptBuilder.walk_path(scene.ego, path))
.and_then(scene.ScriptBuilder.transition(scene, load(target), target_transition + "/exit"))
.and_then(scene.ScriptBuilder.walk_to_deferred(target_transition + "/exit", target_transition + "/entrance"))
.and_then(scene.ScriptBuilder.transition(scene, load(target), appear_at_node + "/exit"))
.and_then(scene.ScriptBuilder.walk_to_deferred(appear_at_node + "/exit", appear_at_node + "/entrance"))
.can_interrupt().build(scene, "_on_script_complete"))