Update initialize-core.md
This commit is contained in:
parent
439556ff4b
commit
717ce7d9fc
5 changed files with 19 additions and 19 deletions
6
dist/FiraCode/Bold.ttf.import
vendored
6
dist/FiraCode/Bold.ttf.import
vendored
|
@ -3,12 +3,12 @@
|
|||
importer="font_data_dynamic"
|
||||
type="FontFile"
|
||||
uid="uid://bvg3rkn8w7apl"
|
||||
path="res://.godot/imported/Bold.ttf-ab518348487b0af32a3bf04bad1329bc.fontdata"
|
||||
path="res://.godot/imported/Bold.ttf-6bb1550eec6255af8f843b07ff368846.fontdata"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://docs/static/dist/FiraCode/Bold.ttf"
|
||||
dest_files=["res://.godot/imported/Bold.ttf-ab518348487b0af32a3bf04bad1329bc.fontdata"]
|
||||
source_file="res://dist/FiraCode/Bold.ttf"
|
||||
dest_files=["res://.godot/imported/Bold.ttf-6bb1550eec6255af8f843b07ff368846.fontdata"]
|
||||
|
||||
[params]
|
||||
|
||||
|
|
6
dist/FiraCode/Medium.ttf.import
vendored
6
dist/FiraCode/Medium.ttf.import
vendored
|
@ -3,12 +3,12 @@
|
|||
importer="font_data_dynamic"
|
||||
type="FontFile"
|
||||
uid="uid://b1pxod4r5puw8"
|
||||
path="res://.godot/imported/Medium.ttf-59b027cf923d1808848708fe911fbecd.fontdata"
|
||||
path="res://.godot/imported/Medium.ttf-436fd36bcf9a8c06f77a7861f6e4be0b.fontdata"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://docs/static/dist/FiraCode/Medium.ttf"
|
||||
dest_files=["res://.godot/imported/Medium.ttf-59b027cf923d1808848708fe911fbecd.fontdata"]
|
||||
source_file="res://dist/FiraCode/Medium.ttf"
|
||||
dest_files=["res://.godot/imported/Medium.ttf-436fd36bcf9a8c06f77a7861f6e4be0b.fontdata"]
|
||||
|
||||
[params]
|
||||
|
||||
|
|
6
dist/FiraCode/Regular.ttf.import
vendored
6
dist/FiraCode/Regular.ttf.import
vendored
|
@ -3,12 +3,12 @@
|
|||
importer="font_data_dynamic"
|
||||
type="FontFile"
|
||||
uid="uid://dmyes0lwt4sgw"
|
||||
path="res://.godot/imported/Regular.ttf-2558edcdc38a3fc7826c41c3a4184518.fontdata"
|
||||
path="res://.godot/imported/Regular.ttf-ca914d4917efa068dc5cfcc7083586ad.fontdata"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://docs/static/dist/FiraCode/Regular.ttf"
|
||||
dest_files=["res://.godot/imported/Regular.ttf-2558edcdc38a3fc7826c41c3a4184518.fontdata"]
|
||||
source_file="res://dist/FiraCode/Regular.ttf"
|
||||
dest_files=["res://.godot/imported/Regular.ttf-ca914d4917efa068dc5cfcc7083586ad.fontdata"]
|
||||
|
||||
[params]
|
||||
|
||||
|
|
6
dist/core.png.import
vendored
6
dist/core.png.import
vendored
|
@ -3,15 +3,15 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://o1vm4b2o5j6"
|
||||
path="res://.godot/imported/core.png-14d81fc9b3dc0a24eb68b48b67e98124.ctex"
|
||||
path="res://.godot/imported/core.png-e89ff2d52965299afbd8a6c20096578d.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://docs/static/dist/core.png"
|
||||
dest_files=["res://.godot/imported/core.png-14d81fc9b3dc0a24eb68b48b67e98124.ctex"]
|
||||
source_file="res://dist/core.png"
|
||||
dest_files=["res://.godot/imported/core.png-e89ff2d52965299afbd8a6c20096578d.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
|
|
@ -13,8 +13,8 @@ extends Node
|
|||
# CORE Object
|
||||
var core: Core
|
||||
# CORE Logger
|
||||
## Will be defined before _ready() is called
|
||||
@onready var logger: CoreBaseModule = core.logger
|
||||
## Gets a so called "logger instance". It basically saves you a argument on each log call.
|
||||
@onready var logger: CoreLoggerInstance = core.logger.get_instance("path/to/script.gd")
|
||||
|
||||
func _init() -> void:
|
||||
# Create new CoreConfiguration
|
||||
|
@ -30,16 +30,16 @@ func _ready() -> void:
|
|||
# Initialize CORE completely
|
||||
await get_tree().process_frame # to avoid "setting up nodes" error
|
||||
get_tree().root.add_child(core) # add CORE Object to SceneTree
|
||||
await get_tree().process_frame # wait for CORE to initialize completely
|
||||
await core.complete_init() # wait for CORE to initialize completely
|
||||
|
||||
# >>> Your code should start executing here <<<<
|
||||
|
||||
# Print "Hello World!" to console with all possible 'LoggerLevel''s
|
||||
for type in CoreTypes.LoggerLevel:
|
||||
if type == "NONE": continue # Exclude "NONE" logger level
|
||||
type = StringName(type.to_lower()) # Convert to StringName
|
||||
logger.call(type, "/path/to/script.gd", "Hello World!") # Call it
|
||||
if type == "NONE": continue # Exclude "NONE" logger level
|
||||
type = StringName(type.to_lower()) # Convert to StringName
|
||||
logger.call(type, "Hello World!") # Call it
|
||||
|
||||
# Test crash
|
||||
logger.crash("/path/to/script.gd", "This is a test crash.")
|
||||
logger.crash("This is a test crash.")
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue