|
|
@@ -9,11 +9,13 @@ func _ready(): |
|
|
|
yarnRunner.add_command("EnableTrigger", funcref(self, "enable_trigger")) |
|
|
|
yarnRunner.add_command("Scene", funcref(self, "scene")) |
|
|
|
|
|
|
|
for trigger in $Triggers.get_children(): |
|
|
|
trigger.connect("trigger_script", self, "trigger_script") |
|
|
|
EventDispatcher.connect("trigger_script", self, "trigger_script") |
|
|
|
|
|
|
|
trigger_script(init_yarn_script) |
|
|
|
Controller.hud.show() |
|
|
|
Controller.player_infos.reset() |
|
|
|
|
|
|
|
trigger_script(init_yarn_script) |
|
|
|
|
|
|
|
func spawn(args): |
|
|
|
yield(get_tree(), "idle_frame") |
|
|
|
|
|
|
@@ -23,7 +25,7 @@ func spawn(args): |
|
|
|
|
|
|
|
var spawner = get_node("Spawners/" + args[0]) |
|
|
|
if spawner != null and spawner.has_method("spawn"): |
|
|
|
spawner.spawn(self) |
|
|
|
spawner.spawn() |
|
|
|
else: |
|
|
|
print("spawner " + args[0] + " not found or not compatible") |
|
|
|
|
|
|
@@ -65,3 +67,7 @@ func scene(args): |
|
|
|
|
|
|
|
print("Request new scene : " + args[0]) |
|
|
|
emit_signal("request_new_scene", args[0]) |
|
|
|
|
|
|
|
func _exit_tree(): |
|
|
|
Controller.hud.hide() |
|
|
|
Controller.speech_panel.hide() |