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