浏览代码

Merge pull request #15157 from Noshyaar/prdocs

[DOCS] Minor docs fix
Rémi Verschelde 7 年之前
父节点
当前提交
4be31e37b0
共有 3 个文件被更改,包括 7 次插入6 次删除
  1. 3 2
      doc/classes/@GDScript.xml
  2. 3 3
      doc/classes/Physics2DServer.xml
  3. 1 1
      doc/classes/StreamPeer.xml

+ 3 - 2
doc/classes/@GDScript.xml

@@ -535,7 +535,7 @@
 			<argument index="0" name="path" type="String">
 			<argument index="0" name="path" type="String">
 			</argument>
 			</argument>
 			<description>
 			<description>
-				Loads a resource from the filesystem located at 'path'. Note: resource paths can be obtained by right clicking on a resource in the Assets Panel and choosing "Copy Path".
+				Loads a resource from the filesystem located at [code]path[/code]. Note: resource paths can be obtained by right clicking on a resource in the Assets Panel and choosing "Copy Path".
 				[codeblock]
 				[codeblock]
 				# load a scene called main located in the root of the project directory
 				# load a scene called main located in the root of the project directory
 				var main = load("res://main.tscn")
 				var main = load("res://main.tscn")
@@ -866,9 +866,10 @@
 			<argument index="0" name="s" type="float">
 			<argument index="0" name="s" type="float">
 			</argument>
 			</argument>
 			<description>
 			<description>
-				Returns sign of [code]s[/code] -1 or 1.
+				Returns the sign of [code]s[/code]: -1 or 1. Returns 0 if [code]s[/code] is 0.
 				[codeblock]
 				[codeblock]
 				sign(-6) # returns -1
 				sign(-6) # returns -1
+				sign(0)  # returns 0
 				sign(6)  # returns 1
 				sign(6)  # returns 1
 				[/codeblock]
 				[/codeblock]
 			</description>
 			</description>

+ 3 - 3
doc/classes/Physics2DServer.xml

@@ -216,7 +216,7 @@
 			<argument index="2" name="disable" type="bool">
 			<argument index="2" name="disable" type="bool">
 			</argument>
 			</argument>
 			<description>
 			<description>
-				Disables a given shape in this area if [code]disable is true[/code]
+				Disables a given shape in an area.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="area_set_shape_transform">
 		<method name="area_set_shape_transform">
@@ -638,7 +638,7 @@
 			<argument index="2" name="enable" type="bool">
 			<argument index="2" name="enable" type="bool">
 			</argument>
 			</argument>
 			<description>
 			<description>
-				Enables one way collision on body if [code]enable is true[/code].
+				Enables one way collision on body if [code]enable[/code] is [code]true[/code].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="body_set_shape_disabled">
 		<method name="body_set_shape_disabled">
@@ -651,7 +651,7 @@
 			<argument index="2" name="disable" type="bool">
 			<argument index="2" name="disable" type="bool">
 			</argument>
 			</argument>
 			<description>
 			<description>
-				Disables shape in body if [code]disable is true[/code].
+				Disables shape in body if [code]disable[/code] is [code]true[/code].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="body_set_shape_metadata">
 		<method name="body_set_shape_metadata">

+ 1 - 1
doc/classes/StreamPeer.xml

@@ -105,7 +105,7 @@
 			<return type="int">
 			<return type="int">
 			</return>
 			</return>
 			<description>
 			<description>
-				Get an unsigned 16 bit value from the stream.
+				Get an unsigned 64 bit value from the stream.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="get_u8">
 		<method name="get_u8">