added first theme progress and switched all files to use static typing

This commit is contained in:
Luca 2024-10-10 15:26:56 +02:00
parent c9458f3627
commit b5ace17da9
2665 changed files with 50249 additions and 476 deletions

View file

@ -1,25 +1,25 @@
extends Node
@onready var scene_root = $/root/Game/CurrentScene
@onready var scene_root: Node3D = $/root/Game/CurrentScene
var current_world : Node = null
func get_world() -> String:
return current_world.scene_file_path
func set_world(path: String):
func set_world(path: String) -> void:
if ResourceLoader.exists(path):
var world = load(path).instantiate()
var world: Node = load(path).instantiate()
scene_root.add_child(world)
current_world = world
else:
printerr("Level %s does not exist" % path)
func remove_world():
var world = scene_root.get_child(0)
func remove_world() -> void:
var world: Node3D = scene_root.get_child(0)
if world == null:
printerr("No world node found")
return
scene_root.remove_child(world)
world.queue_free()
current_world = null