mirror of
https://github.com/thegatesbrowser/thegates.git
synced 2025-08-24 11:17:26 -04:00
add license, move folders
This commit is contained in:
parent
185cc74060
commit
271c4a46a1
132 changed files with 21 additions and 0 deletions
22
app/scripts/app.gd
Normal file
22
app/scripts/app.gd
Normal 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())
|
Loading…
Add table
Add a link
Reference in a new issue