SUI/godot/Init.gd
JeremyStarTM 5afb9819dd
Update CORE Framework
... to commit cc75f108da5a350db3d5d9d1063fe6ab3514ffc3
2024-05-10 21:22:15 +02:00

21 lines
643 B
GDScript

extends Node
var core: Core
var core_config: CoreConfiguration = CoreConfiguration.new()
@onready var logger: CoreLoggerInstance = core.logger.get_instance("Init.gd", self)
@onready var sms: CoreBaseModule = core.sms
func _init() -> void:
core_config.logger_level = CoreTypes.LoggerLevel.DIAG
core = await 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")
sms.add_scene("test", ResourceLoader.load("res://Test.tscn").instantiate(), CoreTypes.SceneType.MAIN)
logger.info("Freeing")
queue_free()