File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
tutorials/scripting/gdscript Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -73,13 +73,13 @@ Documenting script members
7373
7474Members that are applicable for documentation:
7575
76- - Inner class
77- - Constant
78- - Function
7976- Signal
80- - Variable
8177- Enum
8278- Enum value
79+ - Constant
80+ - Variable
81+ - Function
82+ - Inner class
8383
8484Documentation of a script member must immediately precede the member or its annotations
8585if it has any. The description can have more than one line but every line must start with
@@ -106,6 +106,8 @@ For example::
106106
107107Alternatively, you can use inline documentation comments::
108108
109+ signal my_signal ## My signal.
110+
109111 enum MyEnum { ## My enum.
110112 VALUE_A = 0, ## Value A.
111113 VALUE_B = 1, ## Value B.
@@ -115,11 +117,11 @@ Alternatively, you can use inline documentation comments::
115117
116118 var my_var ## My variable.
117119
118- signal my_signal ## My signal.
119120
120121 func my_func(): ## My func.
121122 pass
122123
124+
123125 class MyClass: ## My class.
124126 pass
125127
@@ -142,9 +144,6 @@ Complete script example
142144 ## @tutorial(Tutorial 2): https://example.com/tutorial_2
143145 ## @experimental
144146
145- ## The description of a constant.
146- const GRAVITY = 9.8
147-
148147 ## The description of a signal.
149148 signal my_signal
150149
@@ -160,6 +159,9 @@ Complete script example
160159 RIGHT = 3,
161160 }
162161
162+ ## The description of a constant.
163+ const GRAVITY = 9.8
164+
163165 ## The description of the variable v1.
164166 var v1
165167
You can’t perform that action at this time.
0 commit comments