瀏覽代碼

Add @ to onready annotated variables in docs

Markus Sauermann 3 年之前
父節點
當前提交
70da14db68
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      doc/classes/Node.xml
  2. 1 1
      doc/classes/bool.xml

+ 1 - 1
doc/classes/Node.xml

@@ -79,7 +79,7 @@
 			<return type="void" />
 			<return type="void" />
 			<description>
 			<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.
 				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].
 				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.
 				[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>
 			</description>

+ 1 - 1
doc/classes/bool.xml

@@ -52,7 +52,7 @@
 		[codeblocks]
 		[codeblocks]
 		[gdscript]
 		[gdscript]
 		var _can_shoot = true
 		var _can_shoot = true
-		onready var _cool_down = $CoolDownTimer
+		@onready var _cool_down = $CoolDownTimer
 
 
 		func shoot():
 		func shoot():
 		    if _can_shoot and Input.is_action_pressed("shoot"):
 		    if _can_shoot and Input.is_action_pressed("shoot"):