Update outdated annotation and setget syntax

Co-Authored-By: PoolloverNathan <24194027+PoolloverNathan@users.noreply.github.com>
Co-Authored-By: Solor Vox <1246172+solorvox@users.noreply.github.com>
This commit is contained in:
Hana - Piralein
2024-06-27 19:35:43 +02:00
parent 6df2f2283d
commit 3e2a8f6f7c
4 changed files with 5 additions and 5 deletions

View File

@@ -240,7 +240,7 @@ tree structures.
class_name TreeNode
var _parent: TreeNode = null
var _children: = [] setget
var _children := []
func _notification(p_what):
match p_what:
@@ -283,7 +283,7 @@ Enumerations: int vs. string
Most languages offer an enumeration type option. GDScript is no different, but
unlike most other languages, it allows one to use either integers or strings for
the enum values (the latter only when using the ``export`` keyword in GDScript).
the enum values (the latter only when using the ``@export_enum`` annotation in GDScript).
The question then arises, "which should one use?"
The short answer is, "whichever you are more comfortable with." This

View File

@@ -119,7 +119,7 @@ consider:
in exceptional cases, one may wish not to do this:
1. If the 'imported' class is liable to change, then it should be a property
instead, initialized either using an ``export`` or a ``load()`` (and
instead, initialized either using an ``@export`` or a ``load()`` (and
perhaps not even initialized until later).
2. If the script requires a great many dependencies, and one does not wish