add license, move folders

This commit is contained in:
Nordup 2024-05-04 00:14:24 +04:00
parent 185cc74060
commit 271c4a46a1
132 changed files with 21 additions and 0 deletions

22
app/scripts/app.gd Normal file
View file

@ -0,0 +1,22 @@
extends Node
@export var gate_events: GateEvents
@export var bookmarks: PackedScene
@export var search_results: PackedScene
@export var world_scene: PackedScene
@export var scenes_root: Node
func _ready() -> void:
gate_events.search.connect(func(_query): switch_scene(search_results))
gate_events.open_gate.connect(func(_url): switch_scene(world_scene))
gate_events.exit_gate.connect(func(): switch_scene(bookmarks))
switch_scene(bookmarks)
func switch_scene(scene: PackedScene) -> void:
for child in scenes_root.get_children(): child.queue_free()
await get_tree().process_frame
scenes_root.add_child(scene.instantiate())