Преглед изворни кода

Made edits to match GDScript code order

Updated gdscript_documentation_comments.rst
Andrey Solomatin пре 9 месеци
родитељ
комит
832e85d38a
1 измењених фајлова са 10 додато и 8 уклоњено
  1. 10 8
      tutorials/scripting/gdscript/gdscript_documentation_comments.rst

+ 10 - 8
tutorials/scripting/gdscript/gdscript_documentation_comments.rst

@@ -73,13 +73,13 @@ Documenting script members
 
 
 Members that are applicable for documentation:
 Members that are applicable for documentation:
 
 
-- Inner class
-- Constant
-- Function
 - Signal
 - Signal
-- Variable
 - Enum
 - Enum
 - Enum value
 - Enum value
+- Constant
+- Variable
+- Function
+- Inner class
 
 
 Documentation of a script member must immediately precede the member or its annotations
 Documentation of a script member must immediately precede the member or its annotations
 if it has any. The description can have more than one line but every line must start with
 if it has any. The description can have more than one line but every line must start with
@@ -106,6 +106,8 @@ For example::
 
 
 Alternatively, you can use inline documentation comments::
 Alternatively, you can use inline documentation comments::
 
 
+    signal my_signal ## My signal.
+
     enum MyEnum { ## My enum.
     enum MyEnum { ## My enum.
         VALUE_A = 0, ## Value A.
         VALUE_A = 0, ## Value A.
         VALUE_B = 1, ## Value B.
         VALUE_B = 1, ## Value B.
@@ -115,11 +117,11 @@ Alternatively, you can use inline documentation comments::
 
 
     var my_var ## My variable.
     var my_var ## My variable.
 
 
-    signal my_signal ## My signal.
 
 
     func my_func(): ## My func.
     func my_func(): ## My func.
         pass
         pass
 
 
+
     class MyClass: ## My class.
     class MyClass: ## My class.
         pass
         pass
 
 
@@ -142,9 +144,6 @@ Complete script example
     ## @tutorial(Tutorial 2): https://example.com/tutorial_2
     ## @tutorial(Tutorial 2): https://example.com/tutorial_2
     ## @experimental
     ## @experimental
 
 
-    ## The description of a constant.
-    const GRAVITY = 9.8
-
     ## The description of a signal.
     ## The description of a signal.
     signal my_signal
     signal my_signal
 
 
@@ -160,6 +159,9 @@ Complete script example
         RIGHT = 3,
         RIGHT = 3,
     }
     }
 
 
+    ## The description of a constant.
+    const GRAVITY = 9.8
+
     ## The description of the variable v1.
     ## The description of the variable v1.
     var v1
     var v1