SUI/godot/Init.gd

22 lines
637 B
GDScript3
Raw Normal View History

2024-03-23 13:18:44 +01:00
extends Node
var core: Core
var core_config: CoreConfiguration = CoreConfiguration.new()
2024-05-08 20:45:33 +02:00
@onready var logger: CoreLoggerInstance = core.logger.get_instance("Init.gd", self)
2024-03-23 13:18:44 +01:00
@onready var sms: CoreBaseModule = core.sms
func _init() -> void:
core_config.logger_level = CoreTypes.LoggerLevel.DIAG
core = Core.new(core_config)
func _ready() -> void:
await get_tree().process_frame
get_tree().root.add_child(core)
await core.complete_init()
logger.info("Loading Test.tscn into SceneTree")
2024-05-08 20:45:33 +02:00
sms.add_scene("test", ResourceLoader.load("res://Test.tscn").instantiate(), CoreTypes.SceneType.MAIN)
2024-03-23 13:18:44 +01:00
logger.info("Freeing")
queue_free()