summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-02-05 10:11:13 +0100
committerGitHub <noreply@github.com>2022-02-05 10:11:13 +0100
commit9fd095011ed27c7f6bd7f20cf6f18025cb8b1971 (patch)
tree16d22880577fd295141fee07263816076b651d2b /doc
parentc5a832e0873e5d6c722f7fddb3fc206d00d9c7f1 (diff)
parent70da14db688cc750fdb12ea0f262dcf39bc8e42d (diff)
Merge pull request #57639 from Sauermann/fix-onready-docs
Add @ to onready annotated variables in docs
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/Node.xml2
-rw-r--r--doc/classes/bool.xml2
2 files changed, 2 insertions, 2 deletions
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index 47be5695a0..d041d20656 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -79,7 +79,7 @@
<return type="void" />
<description>
Called when the node is "ready", i.e. when both the node and its children have entered the scene tree. If the node has children, their [method _ready] callbacks get triggered first, and the parent node will receive the ready notification afterwards.
- Corresponds to the [constant NOTIFICATION_READY] notification in [method Object._notification]. See also the [code]onready[/code] keyword for variables.
+ Corresponds to the [constant NOTIFICATION_READY] notification in [method Object._notification]. See also the [code]@onready[/code] annotation for variables.
Usually used for initialization. For even earlier initialization, [method Object._init] may be used. See also [method _enter_tree].
[b]Note:[/b] [method _ready] may be called only once for each node. After removing a node from the scene tree and adding again, [code]_ready[/code] will not be called for the second time. This can be bypassed with requesting another call with [method request_ready], which may be called anywhere before adding the node again.
</description>
diff --git a/doc/classes/bool.xml b/doc/classes/bool.xml
index 49f2d2dd7f..243d19d94f 100644
--- a/doc/classes/bool.xml
+++ b/doc/classes/bool.xml
@@ -52,7 +52,7 @@
[codeblocks]
[gdscript]
var _can_shoot = true
- onready var _cool_down = $CoolDownTimer
+ @onready var _cool_down = $CoolDownTimer
func shoot():
if _can_shoot and Input.is_action_pressed("shoot"):