Make Test.gd more modern
This commit is contained in:
parent
3760f674cb
commit
35cdadf74d
1 changed files with 5 additions and 3 deletions
8
Test.gd
8
Test.gd
|
@ -25,6 +25,8 @@ extends Node
|
|||
var config: CoreConfiguration = CoreConfiguration.new()
|
||||
# CORE Object
|
||||
var core: Core
|
||||
# Logger
|
||||
@onready var logger: CoreLoggerInstance = core.logger.get_instance("Test.gd")
|
||||
|
||||
func _init() -> void:
|
||||
configure_core()
|
||||
|
@ -34,10 +36,10 @@ func _init() -> void:
|
|||
func _ready() -> void:
|
||||
# Inject CORE
|
||||
await get_tree().process_frame
|
||||
add_child(core)
|
||||
get_tree().root.add_child(core)
|
||||
await core.complete_init()
|
||||
# Print information about CORE
|
||||
core.logger.info("Test.gd", await core.get_formatted_string("""Version information:
|
||||
logger.info(await core.get_formatted_string("""Version information:
|
||||
Release (semantic) = %release_semantic%
|
||||
Release = %release%
|
||||
Typerelease = %release_type%
|
||||
|
@ -47,7 +49,7 @@ Development mode = %devmode%
|
|||
Headless mode = %headless%
|
||||
Custom module support = %custommodules%"""))
|
||||
# Print hi
|
||||
core.logger.info("Test.gd", "Hi there!")
|
||||
logger.info("Hi there!")
|
||||
|
||||
# Update CORE configuration
|
||||
func configure_core() -> void:
|
||||
|
|
Loading…
Reference in a new issue