diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/@GDScript.xml | 263 | ||||
-rw-r--r-- | doc/classes/@Global Scope.xml | 2 | ||||
-rw-r--r-- | doc/classes/AudioStreamOGGVorbis.xml | 3 | ||||
-rw-r--r-- | doc/classes/AudioStreamPlayer.xml | 11 | ||||
-rw-r--r-- | doc/classes/AudioStreamPlayer2D.xml | 15 | ||||
-rw-r--r-- | doc/classes/AudioStreamPlayer3D.xml | 32 | ||||
-rw-r--r-- | doc/classes/AudioStreamRandomPitch.xml | 4 | ||||
-rw-r--r-- | doc/classes/AudioStreamSample.xml | 15 | ||||
-rw-r--r-- | doc/classes/CanvasLayer.xml | 8 | ||||
-rw-r--r-- | doc/classes/CapsuleShape.xml | 6 | ||||
-rw-r--r-- | doc/classes/CapsuleShape2D.xml | 6 | ||||
-rw-r--r-- | doc/classes/CircleShape2D.xml | 5 | ||||
-rw-r--r-- | doc/classes/CollisionPolygon.xml | 5 | ||||
-rw-r--r-- | doc/classes/CollisionPolygon2D.xml | 8 | ||||
-rw-r--r-- | doc/classes/JSON.xml | 31 | ||||
-rw-r--r-- | doc/classes/JSONParseResult.xml | 81 | ||||
-rw-r--r-- | doc/classes/Light2D.xml | 21 | ||||
-rw-r--r-- | doc/classes/LineShape2D.xml | 6 | ||||
-rw-r--r-- | doc/classes/OS.xml | 16 | ||||
-rw-r--r-- | doc/classes/RayShape2D.xml | 5 | ||||
-rw-r--r-- | doc/classes/RectangleShape2D.xml | 5 | ||||
-rw-r--r-- | doc/classes/SegmentShape2D.xml | 6 | ||||
-rw-r--r-- | doc/classes/UndoRedo.xml | 26 |
23 files changed, 506 insertions, 74 deletions
diff --git a/doc/classes/@GDScript.xml b/doc/classes/@GDScript.xml index 52df939fc5..7b120afa51 100644 --- a/doc/classes/@GDScript.xml +++ b/doc/classes/@GDScript.xml @@ -82,7 +82,7 @@ Returns the arc sine of 's' in radians. Use to get the angle of sine 's'. [codeblock] # s is 0.523599 or 30 degrees if converted with rad2deg(s) - s = asin(0.5) + s = asin(0.5) [/codeblock] </description> </method> @@ -92,6 +92,14 @@ <argument index="0" name="condition" type="bool"> </argument> <description> + Assert that the condition is true. If the condition is false a fatal error is generated and the program is halted. Useful for debugging to make sure a value is always true. + [codeblock] + # Speed should always be between 0 and 20 + speed = -10 + assert(speed < 20) # Is true and program continues + assert(speed >= 0) # Is false and program stops + assert(speed >= 0 && speed < 20) # Or combined + [/codeblock] </description> </method> <method name="atan"> @@ -100,6 +108,11 @@ <argument index="0" name="s" type="float"> </argument> <description> + Returns the arc tangent of 's' in radians. Use it to get the angle from an angle's tangent in trigonometry: [code]atan(tan(angle)) == angle[/code]. + The method cannot know in which quadrant the angle should fall. See [method atan2] if you always want an exact angle. + [codeblock] + a = atan(0.5) # a is 0.463648 + [/codeblock] </description> </method> <method name="atan2"> @@ -110,10 +123,9 @@ <argument index="1" name="y" type="float"> </argument> <description> - Returns the arc tangent of y/x in radians. Use to get the angle of tangent y/x. To compute the value, the function takes into account the sign of both arguments in order to determine the quadrant. + Returns the arc tangent of y/x in radians. Use to get the angle of tangent y/x. To compute the value, the method takes into account the sign of both arguments in order to determine the quadrant. [codeblock] - # a is 3.141593 - a = atan(0,-1) + a = atan(0,-1) # a is 3.141593 [/codeblock] </description> </method> @@ -134,10 +146,8 @@ <description> Rounds 's' upward, returning the smallest integral value that is not less than 's'. [codeblock] - # i is 2 - i = ceil(1.45) - # i is 2 - i = ceil(1.001) + i = ceil(1.45) # i is 2 + i = ceil(1.001) # i is 2 [/codeblock] </description> </method> @@ -303,7 +313,10 @@ <argument index="0" name="s" type="float"> </argument> <description> - Returns [b]e[/b] raised to the power of 's'. [b]e[/b] sometimes called "Euler's number" is a mathematical constant whose value is approximately 2.71828. + Raises the Euler's constant [b]e[/b] to the power of 's' and returns it. [b] has an approximate value of 2.71828. + [codeblock] + a = exp(2) # approximately 7.39 + [/codeblock] </description> </method> <method name="floor"> @@ -312,7 +325,13 @@ <argument index="0" name="s" type="float"> </argument> <description> - Returns the largest integer value (rounded down) that is less than or equal to 's'. + Rounds 's' to the closest smaller integer and returns it. + [codeblock] + # a is 2 + a = floor(2.99) + # a is -3 + a = floor(-2.99) + [/codeblock] </description> </method> <method name="fmod"> @@ -338,6 +357,26 @@ <argument index="1" name="y" type="float"> </argument> <description> + Returns the floating-point remainder of x/y that wraps equally in positive and negative. + [codeblock] + var i = -10; + while i < 0: + prints(i, fposmod(i, 10)) + i += 1 + [/codeblock] + Produces: + [codeblock] + -10 10 + -9 1 + -8 2 + -7 3 + -6 4 + -5 5 + -4 6 + -3 7 + -2 8 + -1 9 + [/codeblock] </description> </method> <method name="funcref"> @@ -348,6 +387,14 @@ <argument index="1" name="funcname" type="String"> </argument> <description> + Returns a reference to the specified function 'funcname' in the 'instance' node. As functions aren't first-class objects in GDscript, use 'funcref' to store a function in a variable and call it later. + [codeblock] + func foo(): + return("bar") + + a = funcref(self, "foo") + print(a.call_func()) # prints bar + [/codeblock] </description> </method> <method name="hash"> @@ -358,8 +405,7 @@ <description> Returns the integer hash of the variable passed. [codeblock] - # print 177670 - print(hash("a")) + print(hash("a")) # prints 177670 [/codeblock] </description> </method> @@ -396,9 +442,8 @@ func _ready(): var id = get_instance_id() var inst = instance_from_id(id) - print(inst.foo) + print(inst.foo) # prints bar [/codeblock] - Prints "bar" </description> </method> <method name="inverse_lerp"> @@ -413,7 +458,7 @@ <description> Returns a normalized value considering the given range. [codeblock] - inverse_lerp(3, 5, 4) # return 0.5 + inverse_lerp(3, 5, 4) # returns 0.5 [/codeblock] </description> </method> @@ -444,9 +489,8 @@ Returns length of Variant 'var'. Length is the character count of String, element count of Array, size of Dictionary, etc. Note: Generates a fatal error if Variant can not provide a length. [codeblock] a = [1, 2, 3, 4] - print(len(a)) + len(a) # returns 4 [/codeblock] - Prints 4 </description> </method> <method name="lerp"> @@ -460,6 +504,9 @@ </argument> <description> Linear interpolates between two values by a normalized value. + [codeblock] + lerp(1, 3, 0.5) # returns 2 + [/codeblock] </description> </method> <method name="linear2db"> @@ -492,8 +539,7 @@ <description> Natural logarithm. The amount of time needed to reach a certain level of continuous growth. Note: This is not the same as the log funcation on your calculator which is a base 10 logarithm. [codeblock] - # a is 2.302585 - a = log(10) + log(10) # returns 2.302585 [/codeblock] </description> </method> @@ -507,10 +553,8 @@ <description> Returns the maximum of two values. [codeblock] - # a is 2 - a = max(1,2) - # a is -3.99 - a = max(-3.99, -4) + max(1,2) # returns 2 + max(-3.99, -4) # returns -3.99 [/codeblock] </description> </method> @@ -524,10 +568,8 @@ <description> Returns the minimum of two values. [codeblock] - # a is 1 - a = min(1,2) - # a is -4 - a = min(-3.99, -4) + min(1,2) # returns 1 + min(-3.99, -4) # returns -4 [/codeblock] </description> </method> @@ -537,14 +579,11 @@ <argument index="0" name="val" type="int"> </argument> <description> - Returns the nearest larger power of 2 for an integer. + Returns the nearest larger power of 2 for integer 'val'. [codeblock] - # a is 4 - a = nearest_po2(3) - # a is 4 - a = nearest_po2(4) - # a is 8 - a = nearest_po2(5) + nearest_po2(3) # returns 4 + nearest_po2(4) # returns 4 + nearest_po2(5) # returns 8 [/codeblock] </description> </method> @@ -559,7 +598,7 @@ [codeblock] p = parse_json('["a", "b", "c"]') if typeof(p) == TYPE_ARRAY: - print(p[0]) + print(p[0]) # prints a else: print("unexpected results") [/codeblock] @@ -575,8 +614,7 @@ <description> Returns the result of 'x' raised to the power of 'y'. [codeblock] - # a is 32 - a = pow(2,5) + pow(2,5) # returns 32 [/codeblock] </description> </method> @@ -590,6 +628,7 @@ [codeblock] # load a scene called main located in the root of the project directory var main = preload("res://main.tscn") + [/codeblock] </description> </method> <method name="print" qualifiers="vararg"> @@ -599,9 +638,8 @@ Converts one or more arguments to strings in the best way possible and prints them to the console. [codeblock] a = [1,2,3] - print("a","b",a) + print("a","b",a) # prints ab[1, 2, 3] [/codeblock] - Prints ab[1, 2, 3] </description> </method> <method name="print_stack"> @@ -609,6 +647,10 @@ </return> <description> Print a stack track at code location, only works when running with debugger turned on. + Output in the console would look something like this: + [codeblock] + Frame 0 - res://test.gd:16 in function '_process' + [/codeblock] </description> </method> <method name="printerr" qualifiers="vararg"> @@ -616,6 +658,9 @@ </return> <description> Print one or more arguments to strings in the best way possible to standard error line. + [codeblock] + printerr("prints to stderr") + [/codeblock] </description> </method> <method name="printraw" qualifiers="vararg"> @@ -623,6 +668,11 @@ </return> <description> Print one or more arguments to strings in the best way possible to console. No newline is added at the end. + [codeblock] + printraw("A") + printraw("B") + # prints AB + [/codeblock] </description> </method> <method name="prints" qualifiers="vararg"> @@ -630,6 +680,9 @@ </return> <description> Print one or more arguments to the console with a space between each argument. + [codeblock] + prints("A", "B", "C") # prints A B C + [/codeblock] </description> </method> <method name="printt" qualifiers="vararg"> @@ -637,6 +690,9 @@ </return> <description> Print one or more arguments to the console with a tab between each argument. + [codeblock] + printt("A", "B", "C") # prints A B C + [/codeblock] </description> </method> <method name="rad2deg"> @@ -646,6 +702,9 @@ </argument> <description> Convert from radians to degrees. + [codeblock] + rad2deg(0.523599) # returns 30 + [/codeblock] </description> </method> <method name="rand_range"> @@ -657,6 +716,9 @@ </argument> <description> Random range, any floating point value between 'from' and 'to'. + [codeblock] + prints(rand_range(0, 1), rand_range(0, 1)) # prints 0.135591 0.405263 + [/codeblock] </description> </method> <method name="rand_seed"> @@ -673,13 +735,21 @@ </return> <description> Return a random floating point value between 0 and 1. + [codeblock] + randf() # returns 0.375671 + [/codeblock] </description> </method> <method name="randi"> <return type="int"> </return> <description> - Return a random 32 bits integer value. To obtain a random value between 0 to N (where N is smaller than 2^32 - 1), you can use remainder. For example, to get a random integer between 0 and 19 inclusive, you can use randi() % 20. + Return a random 32 bit integer. Use remainder to obtain a random value between 0 and N (where N is smaller than 2^32 -1). + [codeblock] + randi() % 20 # returns random number between 0 and 19 + randi() % 100 # returns random number between 0 and 99 + randi() % 100 + 1 # returns random number between 1 and 100 + [/codeblock] </description> </method> <method name="randomize"> @@ -687,6 +757,10 @@ </return> <description> Randomize the seed (or the internal state) of the random number generator. Current implementation reseeds using a number based on time. + [codeblock] + func _ready(): + randomize() + [/codeblock] </description> </method> <method name="range" qualifiers="vararg"> @@ -694,6 +768,29 @@ </return> <description> Return an array with the given range. Range can be 1 argument N (0 to N-1), two arguments (initial, final-1) or three arguments (initial, final-1, increment). + [codeblock] + for i in range(4): + print(i) + for i in range(2, 5): + print(i) + for i in range(0, 6, 2): + print(i) + [/codeblock] + Output: + [codeblock] + 0 + 1 + 2 + 3 + + 2 + 3 + 4 + + 0 + 2 + 4 + [/codeblock] </description> </method> <method name="range_lerp"> @@ -723,6 +820,9 @@ </argument> <description> Returns the integral value that is nearest to s, with halfway cases rounded away from zero. + [codeblock] + round(2.6) # returns 3 + [/codeblock] </description> </method> <method name="seed"> @@ -732,6 +832,10 @@ </argument> <description> Set seed for the random number generator. + [codeblock] + my_seed = "Godot Rocks" + seed(my_seed.hash()) + [/codeblock] </description> </method> <method name="sign"> @@ -740,7 +844,11 @@ <argument index="0" name="s" type="float"> </argument> <description> - Return sign (-1 or +1). + Return sign of 's' -1 or 1. + [codeblock] + sign(-6) # returns -1 + sign(6) # returns 1 + [/codeblock] </description> </method> <method name="sin"> @@ -749,7 +857,10 @@ <argument index="0" name="s" type="float"> </argument> <description> - Returns the sine of an angle of s radians. + Return the sine of angle 's' in radians. + [codeblock] + sin(0.523599) # returns 0.5 + [/codeblock] </description> </method> <method name="sinh"> @@ -758,7 +869,11 @@ <argument index="0" name="s" type="float"> </argument> <description> - Returns the hyperbolic sine of s. + Return the hyperbolic sine of 's'. + [codeblock] + a = log(2.0) # returns 0.693147 + sinh(a) # returns 0.75 + [/codeblock] </description> </method> <method name="sqrt"> @@ -767,7 +882,10 @@ <argument index="0" name="s" type="float"> </argument> <description> - Returns the square root of s. + Return the square root of 's'. + [codeblock] + sqrt(9) # returns 3 + [/codeblock] </description> </method> <method name="stepify"> @@ -786,6 +904,12 @@ </return> <description> Convert one or more arguments to string in the best way possible. + [codeblock] + var a = [10, 20, 30] + var b = str(a); + len(a) # returns 3 + len(b) # returns 12 + [/codeblock] </description> </method> <method name="str2var"> @@ -795,6 +919,11 @@ </argument> <description> Convert a formatted string that was returned by [method var2str] to the original value. + [codeblock] + a = '{ "a": 1, "b": 2 }' + b = str2var(a) + print(b['a']) # prints 1 + [/codeblock] </description> </method> <method name="tan"> @@ -803,7 +932,10 @@ <argument index="0" name="s" type="float"> </argument> <description> - Returns the tangent of an angle of s radians. + Return the tangent of angle 's' in radians. + [codeblock] + tan( deg2rad(45) ) # returns 1 + [/codeblock] </description> </method> <method name="tanh"> @@ -812,7 +944,11 @@ <argument index="0" name="s" type="float"> </argument> <description> - Returns the hyperbolic tangent of s. + Returns the hyperbolic tangent of 's'. + [codeblock] + a = log(2.0) # returns 0.693147 + tanh(a) # returns 0.6 + [/codeblock] </description> </method> <method name="to_json"> @@ -821,7 +957,12 @@ <argument index="0" name="var" type="Variant"> </argument> <description> - Convert a Variant to json text. + Convert a Variant 'var' to json text and return the result. Useful for serializing data to store or send over the network + [codeblock] + a = { 'a': 1, 'b': 2 } + b = to_json(a) + print(b) # {"a":1, "b":2} + [/codeblock] </description> </method> <method name="type_exists"> @@ -844,6 +985,13 @@ </argument> <description> Return the internal type of the given Variant object, using the TYPE_* enum in [@Global Scope]. + [codeblock] + p = parse_json('["a", "b", "c"]') + if typeof(p) == TYPE_ARRAY: + print(p[0]) # prints a + else: + print("unexpected results") + [/codeblock] </description> </method> <method name="validate_json"> @@ -852,7 +1000,15 @@ <argument index="0" name="json" type="String"> </argument> <description> - This method is used to validate the structure and data types of a piece of JSON, similar to XML Schema for XML. + Check that 'json' is valid json data. Return empty string if valid. Return error message if not valid. + [codeblock] + j = to_json([1, 2, 3]) + v = validate_json(j) + if not v: + print("valid") + else: + prints("invalid", v) + [/codeblock] </description> </method> <method name="var2bytes"> @@ -871,6 +1027,17 @@ </argument> <description> Convert a value to a formatted string that can later be parsed using [method str2var]. + [codeblock] + a = { 'a': 1, 'b': 2 } + print(var2str(a)) + [/codeblock] + prints + [codeblock] + { + "a": 1, + "b": 2 + } + [/codeblock] </description> </method> <method name="weakref"> diff --git a/doc/classes/@Global Scope.xml b/doc/classes/@Global Scope.xml index 4044c4ed1f..a8fd377ecf 100644 --- a/doc/classes/@Global Scope.xml +++ b/doc/classes/@Global Scope.xml @@ -38,6 +38,8 @@ <member name="InputMap" type="InputMap" setter="" getter=""> [InputMap] singleton </member> + <member name="JSON" type="JSON" setter="" getter=""> + </member> <member name="Marshalls" type="Reference" setter="" getter=""> [Marshalls] singleton </member> diff --git a/doc/classes/AudioStreamOGGVorbis.xml b/doc/classes/AudioStreamOGGVorbis.xml index fd9018764d..679438b66b 100644 --- a/doc/classes/AudioStreamOGGVorbis.xml +++ b/doc/classes/AudioStreamOGGVorbis.xml @@ -56,10 +56,13 @@ </methods> <members> <member name="data" type="PoolByteArray" setter="set_data" getter="get_data"> + Raw audio data. </member> <member name="loop" type="bool" setter="set_loop" getter="has_loop"> + If [code]true[/code], audio will loop continuously. Default value: [code]false[/code]. </member> <member name="loop_offset" type="float" setter="set_loop_offset" getter="get_loop_offset"> + If loop is [code]true[/code], loop starts from this position, in seconds. </member> </members> <constants> diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml index 6ee0ba09a1..edf5dd619b 100644 --- a/doc/classes/AudioStreamPlayer.xml +++ b/doc/classes/AudioStreamPlayer.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioStreamPlayer" inherits="Node" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Plays back audio. </brief_description> <description> + Plays background audio. </description> <tutorials> </tutorials> @@ -57,6 +59,7 @@ <argument index="0" name="from_pos" type="float" default="0.0"> </argument> <description> + Plays the audio from the given position 'from_pos', in seconds. </description> </method> <method name="seek"> @@ -65,6 +68,7 @@ <argument index="0" name="to_pos" type="float"> </argument> <description> + Sets the position from which audio will be played, in seconds. </description> </method> <method name="set_autoplay"> @@ -111,26 +115,33 @@ <return type="void"> </return> <description> + Stops the audio. </description> </method> </methods> <members> <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled"> + If [code]true[/code], audio plays when added to scene tree. Default value: [code]false[/code]. </member> <member name="bus" type="String" setter="set_bus" getter="get_bus"> + Bus on which this audio is playing. </member> <member name="mix_target" type="int" setter="set_mix_target" getter="get_mix_target" enum="AudioStreamPlayer.MixTarget"> </member> <member name="playing" type="bool" setter="_set_playing" getter="is_playing"> + If [code]true[/code], audio is playing. </member> <member name="stream" type="AudioStream" setter="set_stream" getter="get_stream"> + The [AudioStream] object to be played. </member> <member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db"> + Volume of sound, in dB. </member> </members> <signals> <signal name="finished"> <description> + Emitted when the audio stops playing. </description> </signal> </signals> diff --git a/doc/classes/AudioStreamPlayer2D.xml b/doc/classes/AudioStreamPlayer2D.xml index f2464ddac4..e31f2dd941 100644 --- a/doc/classes/AudioStreamPlayer2D.xml +++ b/doc/classes/AudioStreamPlayer2D.xml @@ -1,10 +1,13 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioStreamPlayer2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Plays audio in 2D. </brief_description> <description> + Plays audio that dampens with distance from screen center. </description> <tutorials> + http://docs.godotengine.org/en/latest/learning/features/audio/index.html </tutorials> <demos> </demos> @@ -69,6 +72,7 @@ <argument index="0" name="from_pos" type="float" default="0.0"> </argument> <description> + Plays the audio from the given position 'from_pos', in seconds. </description> </method> <method name="seek"> @@ -77,6 +81,7 @@ <argument index="0" name="to_pos" type="float"> </argument> <description> + Sets the position from which audio will be played, in seconds. </description> </method> <method name="set_area_mask"> @@ -139,30 +144,40 @@ <return type="void"> </return> <description> + Stops the audio. </description> </method> </methods> <members> <member name="area_mask" type="int" setter="set_area_mask" getter="get_area_mask"> + Areas in which this sound plays. </member> <member name="attenuation" type="float" setter="set_attenuation" getter="get_attenuation"> + Dampens audio over distance with this as an exponent. </member> <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled"> + If [code]true[/code], audio plays when added to scene tree. Default value: [code]false[/code]. </member> <member name="bus" type="String" setter="set_bus" getter="get_bus"> + Bus on which this audio is playing. </member> <member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance"> + Maximum distance from which audio is still hearable. </member> <member name="playing" type="bool" setter="_set_playing" getter="is_playing"> + If [code]true[/code], audio is playing. </member> <member name="stream" type="AudioStream" setter="set_stream" getter="get_stream"> + The [AudioStream] object to be played. </member> <member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db"> + Base volume without dampening. </member> </members> <signals> <signal name="finished"> <description> + Emitted when the audio stops playing. </description> </signal> </signals> diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml index 668e0cc0d2..3aad0ea87a 100644 --- a/doc/classes/AudioStreamPlayer3D.xml +++ b/doc/classes/AudioStreamPlayer3D.xml @@ -1,10 +1,13 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioStreamPlayer3D" inherits="Spatial" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Plays 3D sound in 3D space </brief_description> <description> + Plays a sound effect with directed sound effects, dampens with distance if needed, generates effect of hearable position in space. </description> <tutorials> + http://docs.godotengine.org/en/latest/learning/features/audio/index.html </tutorials> <demos> </demos> @@ -123,6 +126,7 @@ <argument index="0" name="from_pos" type="float" default="0.0"> </argument> <description> + Plays the audio from the given position 'from_pos', in seconds. </description> </method> <method name="seek"> @@ -131,6 +135,7 @@ <argument index="0" name="to_pos" type="float"> </argument> <description> + Sets the position from which audio will be played, in seconds. </description> </method> <method name="set_area_mask"> @@ -265,67 +270,94 @@ <return type="void"> </return> <description> + Stops the audio. </description> </method> </methods> <members> <member name="area_mask" type="int" setter="set_area_mask" getter="get_area_mask"> + Areas in which this sound plays. </member> <member name="attenuation_filter_cutoff_hz" type="float" setter="set_attenuation_filter_cutoff_hz" getter="get_attenuation_filter_cutoff_hz"> + Dampens audio above this frequency, in Hz. </member> <member name="attenuation_filter_db" type="float" setter="set_attenuation_filter_db" getter="get_attenuation_filter_db"> + Amount how much the filter affects the loudness, in dB. </member> <member name="attenuation_model" type="int" setter="set_attenuation_model" getter="get_attenuation_model" enum="AudioStreamPlayer3D.AttenuationModel"> + Decides if audio should get quieter with distance linearly, quadratically or logarithmically. </member> <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled"> + If [code]true[/code], audio plays audio plays when added to scene tree. Default value: [code]false[/code]. </member> <member name="bus" type="String" setter="set_bus" getter="get_bus"> + Bus on which this audio is playing. </member> <member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" enum="AudioStreamPlayer3D.DopplerTracking"> + Decides in which step the Doppler effect should be calculated. </member> <member name="emission_angle_degrees" type="float" setter="set_emission_angle" getter="get_emission_angle"> + The angle in which the audio reaches cameras undampened. </member> <member name="emission_angle_enabled" type="bool" setter="set_emission_angle_enabled" getter="is_emission_angle_enabled"> + If [code]true[/code], the audio should be dampened according to the direction of the sound. </member> <member name="emission_angle_filter_attenuation_db" type="float" setter="set_emission_angle_filter_attenuation_db" getter="get_emission_angle_filter_attenuation_db"> + dampens audio if camera is outside of 'emission_angle_degrees' and 'emission_angle_enabled' is set by this factor, in dB. </member> <member name="max_db" type="float" setter="set_max_db" getter="get_max_db"> + Sets the absolute maximum of the soundlevel, in dB. </member> <member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance"> + Sets the distance from wich the 'out_of_range_mode' takes effect. Has no effect if set to 0. </member> <member name="out_of_range_mode" type="int" setter="set_out_of_range_mode" getter="get_out_of_range_mode" enum="AudioStreamPlayer3D.OutOfRangeMode"> + Decides if audio should pause when source is outside of 'max_distance' range. </member> <member name="playing" type="bool" setter="_set_playing" getter="is_playing"> + If [code]true[/code], audio is playing. </member> <member name="stream" type="AudioStream" setter="set_stream" getter="get_stream"> + The [AudioStream] object to be played. </member> <member name="unit_db" type="float" setter="set_unit_db" getter="get_unit_db"> + Base sound level unaffected by dampening, in dB. </member> <member name="unit_size" type="float" setter="set_unit_size" getter="get_unit_size"> + Factor for the attenuation effect. </member> </members> <signals> <signal name="finished"> <description> + Fires when the audio stops playing. </description> </signal> </signals> <constants> <constant name="ATTENUATION_INVERSE_DISTANCE" value="0"> + Linear dampening of loudness according to distance. </constant> <constant name="ATTENUATION_INVERSE_SQUARE_DISTANCE" value="1"> + Squared dampening of loudness according to distance. </constant> <constant name="ATTENUATION_LOGARITHMIC" value="2"> + Logarithmic dampening of loudness according to distance. </constant> <constant name="OUT_OF_RANGE_MIX" value="0"> + Mix this audio in, even when it's out of range. </constant> <constant name="OUT_OF_RANGE_PAUSE" value="1"> + Pause this audio when it gets out of range. </constant> <constant name="DOPPLER_TRACKING_DISABLED" value="0"> + Disables doppler tracking. </constant> <constant name="DOPPLER_TRACKING_IDLE_STEP" value="1"> + Executes doppler trackin in idle step. </constant> <constant name="DOPPLER_TRACKING_FIXED_STEP" value="2"> + Executes doppler tracking in fixed step. </constant> </constants> </class> diff --git a/doc/classes/AudioStreamRandomPitch.xml b/doc/classes/AudioStreamRandomPitch.xml index 91856682e6..1573a78d1f 100644 --- a/doc/classes/AudioStreamRandomPitch.xml +++ b/doc/classes/AudioStreamRandomPitch.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioStreamRandomPitch" inherits="AudioStream" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Plays audio with random pitch tweaking. </brief_description> <description> + Randomly varies pitch on each start. </description> <tutorials> </tutorials> @@ -40,8 +42,10 @@ </methods> <members> <member name="audio_stream" type="AudioStream" setter="set_audio_stream" getter="get_audio_stream"> + The current [AudioStream]. </member> <member name="random_pitch" type="float" setter="set_random_pitch" getter="get_random_pitch"> + The intensity of random pitch variation. </member> </members> <constants> diff --git a/doc/classes/AudioStreamSample.xml b/doc/classes/AudioStreamSample.xml index 22b820aa7d..7f7414e4d3 100644 --- a/doc/classes/AudioStreamSample.xml +++ b/doc/classes/AudioStreamSample.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioStreamSample" inherits="AudioStream" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Plays audio. </brief_description> <description> + Plays audio, can loop. </description> <tutorials> </tutorials> @@ -110,32 +112,45 @@ </methods> <members> <member name="data" type="PoolByteArray" setter="set_data" getter="get_data"> + Raw audio data. </member> <member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamSample.Format"> + Audio format. See FORMAT_* constants for values. </member> <member name="loop_begin" type="int" setter="set_loop_begin" getter="get_loop_begin"> + Loop start in bytes. </member> <member name="loop_end" type="int" setter="set_loop_end" getter="get_loop_end"> + Loop end in bytes. </member> <member name="loop_mode" type="int" setter="set_loop_mode" getter="get_loop_mode" enum="AudioStreamSample.LoopMode"> + Loop mode. See LOOP_* constants for values. </member> <member name="mix_rate" type="int" setter="set_mix_rate" getter="get_mix_rate"> + The sample rate for mixing this audio. </member> <member name="stereo" type="bool" setter="set_stereo" getter="is_stereo"> + If [code]true[/code], audio is stereo. Default value: [code]false[/code]. </member> </members> <constants> <constant name="FORMAT_8_BITS" value="0"> + Audio codec 8 bit. </constant> <constant name="FORMAT_16_BITS" value="1"> + Audio codec 16 bit. </constant> <constant name="FORMAT_IMA_ADPCM" value="2"> + Audio codec IMA ADPCM. </constant> <constant name="LOOP_DISABLED" value="0"> + Audio does not loop. </constant> <constant name="LOOP_FORWARD" value="1"> + Audio loops the data between loop_begin and loop_end playing forward only. </constant> <constant name="LOOP_PING_PONG" value="2"> + Audio loops the data between loop_begin and loop_end playing back and forth. </constant> </constants> </class> diff --git a/doc/classes/CanvasLayer.xml b/doc/classes/CanvasLayer.xml index f19e7ef041..3ee1f10536 100644 --- a/doc/classes/CanvasLayer.xml +++ b/doc/classes/CanvasLayer.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="CanvasLayer" inherits="Node" category="Core" version="3.0.alpha.custom_build"> <brief_description> - Canvas Item layer. + Canvas drawing layer. </brief_description> <description> - Canvas Item layer. [CanvasItem] nodes that are direct or indirect children of a [CanvasLayer] will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index 0, so a [CanvasLayer] with index -1 will be drawn below, and one with index 1 will be drawn above. This is very useful for HUDs (in layer 1+ or above), or backgrounds (in layer -1 or below). + Canvas drawing layer. [CanvasItem] nodes that are direct or indirect children of a [CanvasLayer] will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index 0, so a [CanvasLayer] with index -1 will be drawn below, and one with index 1 will be drawn above. This is very useful for HUDs (in layer 1+ or above), or backgrounds (in layer -1 or below). </description> <tutorials> </tutorials> @@ -131,12 +131,16 @@ </methods> <members> <member name="layer" type="int" setter="set_layer" getter="get_layer"> + Layer index for draw order. Lower values are drawn first. Default value: [code]1[/code]. </member> <member name="offset" type="Vector2" setter="set_offset" getter="get_offset"> + The layer's base offset. </member> <member name="rotation" type="float" setter="set_rotationd" getter="get_rotationd"> + The layer's rotation in degrees. </member> <member name="scale" type="Vector2" setter="set_scale" getter="get_scale"> + The layer's scale. </member> </members> <constants> diff --git a/doc/classes/CapsuleShape.xml b/doc/classes/CapsuleShape.xml index 29072203ea..db075a504c 100644 --- a/doc/classes/CapsuleShape.xml +++ b/doc/classes/CapsuleShape.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="CapsuleShape" inherits="Shape" category="Core" version="3.0.alpha.custom_build"> <brief_description> - Capsule shape resource. + Capsule shape for collisions. </brief_description> <description> - Capsule shape resource, which can be set into a [PhysicsBody] or area. + Capsule shape for collisions. </description> <tutorials> </tutorials> @@ -46,8 +46,10 @@ </methods> <members> <member name="height" type="float" setter="set_height" getter="get_height"> + The capsule's height. </member> <member name="radius" type="float" setter="set_radius" getter="get_radius"> + The capsule's radius. </member> </members> <constants> diff --git a/doc/classes/CapsuleShape2D.xml b/doc/classes/CapsuleShape2D.xml index 9c2b1c4a3d..df833e0582 100644 --- a/doc/classes/CapsuleShape2D.xml +++ b/doc/classes/CapsuleShape2D.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="CapsuleShape2D" inherits="Shape2D" category="Core" version="3.0.alpha.custom_build"> <brief_description> - Capsule 2D shape resource for physics. + Capsule shape for 2D collisions. </brief_description> <description> - Capsule 2D shape resource for physics. A capsule (or sometimes called "pill") is like a line grown in all directions. It has a radius and a height, and is often useful for modeling biped characters. + Capsule shape for 2D collisions. </description> <tutorials> </tutorials> @@ -46,8 +46,10 @@ </methods> <members> <member name="height" type="float" setter="set_height" getter="get_height"> + The capsule's height. </member> <member name="radius" type="float" setter="set_radius" getter="get_radius"> + The capsules's radius. </member> </members> <constants> diff --git a/doc/classes/CircleShape2D.xml b/doc/classes/CircleShape2D.xml index c3d4bdae03..1ed54f0705 100644 --- a/doc/classes/CircleShape2D.xml +++ b/doc/classes/CircleShape2D.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="CircleShape2D" inherits="Shape2D" category="Core" version="3.0.alpha.custom_build"> <brief_description> - Circular Shape for 2D Physics. + Circular shape for 2D collisions. </brief_description> <description> - Circular Shape for 2D Physics. This shape is useful for modeling balls or small characters and its collision detection with everything else is very fast. + Circular shape for 2D collisions. This shape is useful for modeling balls or small characters and its collision detection with everything else is very fast. </description> <tutorials> </tutorials> @@ -30,6 +30,7 @@ </methods> <members> <member name="radius" type="float" setter="set_radius" getter="get_radius"> + The circle's radius. </member> </members> <constants> diff --git a/doc/classes/CollisionPolygon.xml b/doc/classes/CollisionPolygon.xml index cf425e3d60..c2496424d6 100644 --- a/doc/classes/CollisionPolygon.xml +++ b/doc/classes/CollisionPolygon.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="CollisionPolygon" inherits="Spatial" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Editor-only class for defining a collision polygon in 3D space. </brief_description> <description> + Allows editing a collision polygon's vertices on a selected plane. Can also set a depth perpendicular to that plane. This class is only available in the editor. It will not appear in the scene tree at runtime. Creates a [Shape] for gameplay. Properties modified during gameplay will have no effect. </description> <tutorials> </tutorials> @@ -54,10 +56,13 @@ </methods> <members> <member name="depth" type="float" setter="set_depth" getter="get_depth"> + Length that the resulting collision extends in either direction perpendicular to its polygon. </member> <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled"> + If true, no collision will be produced. </member> <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon"> + Array of vertices which define the polygon. </member> </members> <constants> diff --git a/doc/classes/CollisionPolygon2D.xml b/doc/classes/CollisionPolygon2D.xml index b602610167..d3dee1e9bb 100644 --- a/doc/classes/CollisionPolygon2D.xml +++ b/doc/classes/CollisionPolygon2D.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="CollisionPolygon2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build"> <brief_description> - Editor-only class for easy editing of collision polygons. + Editor-only class for defining a collision polygon in 2D space. </brief_description> <description> - Editor-only class. This is not present when running the game. It's used in the editor to properly edit and position collision shapes in [CollisionObject2D]. This is not accessible from regular code. This class is for editing custom shape polygons. + Allows editing a collision polygon's vertices. This class is only available in the editor. It will not appear in the scene tree at runtime. Creates a [Shape2D] for gameplay. Properties modified during gameplay will have no effect. </description> <tutorials> </tutorials> @@ -75,12 +75,16 @@ </methods> <members> <member name="build_mode" type="int" setter="set_build_mode" getter="get_build_mode" enum="CollisionPolygon2D.BuildMode"> + If BUILD_SOLIDS, the polygon and the area within it will have collision. If BUILD_SEGMENTS, only the edges of the polygon will have collision. </member> <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled"> + If true, no collision will be produced. </member> <member name="one_way_collision" type="bool" setter="set_one_way_collision" getter="is_one_way_collision_enabled"> + If true, only edges that face up, relative to CollisionPolygon2D's rotation, will collide with other objects. </member> <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon"> + Array of vertices which define the polygon. </member> </members> <constants> diff --git a/doc/classes/JSON.xml b/doc/classes/JSON.xml new file mode 100644 index 0000000000..a38b2f61cf --- /dev/null +++ b/doc/classes/JSON.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="JSON" inherits="Object" category="Core" version="3.0.alpha.custom_build"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + <method name="parse"> + <return type="JSONParseResult"> + </return> + <argument index="0" name="json" type="String"> + </argument> + <description> + </description> + </method> + <method name="print"> + <return type="String"> + </return> + <argument index="0" name="value" type="Variant"> + </argument> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/JSONParseResult.xml b/doc/classes/JSONParseResult.xml new file mode 100644 index 0000000000..6aeb614508 --- /dev/null +++ b/doc/classes/JSONParseResult.xml @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="JSONParseResult" inherits="Reference" category="Core" version="3.0.alpha.custom_build"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + <method name="get_error" qualifiers="const"> + <return type="int" enum="Error"> + </return> + <description> + </description> + </method> + <method name="get_error_line" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="get_error_string" qualifiers="const"> + <return type="String"> + </return> + <description> + </description> + </method> + <method name="get_result" qualifiers="const"> + <return type="Variant"> + </return> + <description> + </description> + </method> + <method name="set_error"> + <return type="void"> + </return> + <argument index="0" name="error" type="int" enum="Error"> + </argument> + <description> + </description> + </method> + <method name="set_error_line"> + <return type="void"> + </return> + <argument index="0" name="error_line" type="int"> + </argument> + <description> + </description> + </method> + <method name="set_error_string"> + <return type="void"> + </return> + <argument index="0" name="error_string" type="String"> + </argument> + <description> + </description> + </method> + <method name="set_result"> + <return type="void"> + </return> + <argument index="0" name="result" type="Variant"> + </argument> + <description> + </description> + </method> + </methods> + <members> + <member name="error" type="int" setter="set_error" getter="get_error" enum="Error"> + </member> + <member name="error_line" type="int" setter="set_error_line" getter="get_error_line"> + </member> + <member name="error_string" type="String" setter="set_error_string" getter="get_error_string"> + </member> + <member name="result" type="Variant" setter="set_result" getter="get_result"> + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/Light2D.xml b/doc/classes/Light2D.xml index 1386fc53d9..7ce7cef7c1 100644 --- a/doc/classes/Light2D.xml +++ b/doc/classes/Light2D.xml @@ -340,46 +340,67 @@ </methods> <members> <member name="color" type="Color" setter="set_color" getter="get_color"> + The Light2D's [Color]. </member> <member name="editor_only" type="bool" setter="set_editor_only" getter="is_editor_only"> + If [code]true[/code] Light2D will only appear when editing the scene. Default value: [code]false[/code]. </member> <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled"> + If [code]true[/code] Light2D will emit light. Default value: [code]true[/code]. </member> <member name="energy" type="float" setter="set_energy" getter="get_energy"> + The Light2D's energy value. The larger the value, the stronger the light. </member> <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="Light2D.Mode"> + The Light2D's mode. See MODE_* constants for values. </member> <member name="offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset"> + The offset of the Light2D's [code]texture[/code]. </member> <member name="range_height" type="float" setter="set_height" getter="get_height"> + The height of the Light2D. Used with 2D normal mapping. </member> <member name="range_item_cull_mask" type="int" setter="set_item_cull_mask" getter="get_item_cull_mask"> + The layer mask. Only objects with a matching mask will be affected by the Light2D. </member> <member name="range_layer_max" type="int" setter="set_layer_range_max" getter="get_layer_range_max"> + Maximum layer value of objects that are affected by the Light2D. Default value: [code]0[/code]. </member> <member name="range_layer_min" type="int" setter="set_layer_range_min" getter="get_layer_range_min"> + Minimum layer value of objects that are affected by the Light2D. Default value: [code]0[/code]. </member> <member name="range_z_max" type="int" setter="set_z_range_max" getter="get_z_range_max"> + Maximum [code]Z[/code] value of objects that are affected by the Light2D. Default value: [code]1024[/code]. </member> <member name="range_z_min" type="int" setter="set_z_range_min" getter="get_z_range_min"> + Minimum [code]z[/code] value of objects that are affected by the Light2D. Default value: [code]-1024[/code]. </member> <member name="shadow_buffer_size" type="int" setter="set_shadow_buffer_size" getter="get_shadow_buffer_size"> + Shadow buffer size. Default value: [code]2048[/code]. </member> <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color"> + [Color] of shadows cast by the Light2D. </member> <member name="shadow_enabled" type="bool" setter="set_shadow_enabled" getter="is_shadow_enabled"> + If [code]true[/code] the Light2D will cast shadows. Default value: [code]false[/code]. </member> <member name="shadow_filter" type="int" setter="set_shadow_filter" getter="get_shadow_filter" enum="Light2D.ShadowFilter"> + Shadow filter type. May be one of [code][None, PCF5, PCF9, PCF13][/code]. Default value: [code]None[/code]. </member> <member name="shadow_filter_smooth" type="float" setter="set_shadow_smooth" getter="get_shadow_smooth"> + Smoothing value for shadows. </member> <member name="shadow_gradient_length" type="float" setter="set_shadow_gradient_length" getter="get_shadow_gradient_length"> + Smooth shadow gradient length. </member> <member name="shadow_item_cull_mask" type="int" setter="set_item_shadow_cull_mask" getter="get_item_shadow_cull_mask"> + The shadow mask. Used with [LightOccluder2D] to cast shadows. Only occluders with a matching shadow mask will cast shadows. </member> <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> + [Texture] used for the Light2D's appearance. </member> <member name="texture_scale" type="float" setter="set_texture_scale" getter="get_texture_scale"> + The [code]texture[/code]'s scale factor. </member> </members> <constants> diff --git a/doc/classes/LineShape2D.xml b/doc/classes/LineShape2D.xml index 3346c46a19..5596c48162 100644 --- a/doc/classes/LineShape2D.xml +++ b/doc/classes/LineShape2D.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="LineShape2D" inherits="Shape2D" category="Core" version="3.0.alpha.custom_build"> <brief_description> - Line shape for 2D collision objects. + Line shape for 2D collisions. </brief_description> <description> - Line shape for 2D collision objects. It works like a 2D plane and will not allow any body to go to the negative side. Not recommended for rigid bodies, and usually not recommended for static bodies either because it forces checks against it on every frame. + Line shape for 2D collisions. It works like a 2D plane and will not allow any body to go to the negative side. Not recommended for rigid bodies, and usually not recommended for static bodies either because it forces checks against it on every frame. </description> <tutorials> </tutorials> @@ -46,8 +46,10 @@ </methods> <members> <member name="d" type="float" setter="set_d" getter="get_d"> + The line's distance from the origin. </member> <member name="normal" type="Vector2" setter="set_normal" getter="get_normal"> + The line's normal. </member> </members> <constants> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 5b14d5a746..65200c4769 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -286,7 +286,7 @@ </description> </method> <method name="get_screen_orientation" qualifiers="const"> - <return type="int" enum="_OS.ScreenOrientation"> + <return type="int" enum="OS.ScreenOrientation"> </return> <description> Returns the current screen orientation, the return value will be one of the SCREEN_ORIENTATION constants in this class. @@ -331,7 +331,7 @@ <method name="get_system_dir" qualifiers="const"> <return type="String"> </return> - <argument index="0" name="dir" type="int" enum="_OS.SystemDir"> + <argument index="0" name="dir" type="int" enum="OS.SystemDir"> </argument> <description> </description> @@ -660,7 +660,7 @@ <method name="set_screen_orientation"> <return type="void"> </return> - <argument index="0" name="orientation" type="int" enum="_OS.ScreenOrientation"> + <argument index="0" name="orientation" type="int" enum="OS.ScreenOrientation"> </argument> <description> Sets the current screen orientation, the argument value must be one of the SCREEN_ORIENTATION constants in this class. @@ -840,15 +840,15 @@ </constant> <constant name="SYSTEM_DIR_RINGTONES" value="7"> </constant> - <constant name="OS::POWERSTATE_UNKNOWN" value="0"> + <constant name="POWERSTATE_UNKNOWN" value="0"> </constant> - <constant name="OS::POWERSTATE_ON_BATTERY" value="1"> + <constant name="POWERSTATE_ON_BATTERY" value="1"> </constant> - <constant name="OS::POWERSTATE_NO_BATTERY" value="2"> + <constant name="POWERSTATE_NO_BATTERY" value="2"> </constant> - <constant name="OS::POWERSTATE_CHARGING" value="3"> + <constant name="POWERSTATE_CHARGING" value="3"> </constant> - <constant name="OS::POWERSTATE_CHARGED" value="4"> + <constant name="POWERSTATE_CHARGED" value="4"> </constant> </constants> </class> diff --git a/doc/classes/RayShape2D.xml b/doc/classes/RayShape2D.xml index 8414ee2348..4f6313a1d2 100644 --- a/doc/classes/RayShape2D.xml +++ b/doc/classes/RayShape2D.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="RayShape2D" inherits="Shape2D" category="Core" version="3.0.alpha.custom_build"> <brief_description> - Ray 2D shape resource for physics. + Ray shape for 2D collisions. </brief_description> <description> - Ray 2D shape resource for physics. A ray is not really a collision body, instead it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. + Ray shape for 2D collisions. A ray is not really a collision body, instead it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. </description> <tutorials> </tutorials> @@ -30,6 +30,7 @@ </methods> <members> <member name="length" type="float" setter="set_length" getter="get_length"> + The ray's length. </member> </members> <constants> diff --git a/doc/classes/RectangleShape2D.xml b/doc/classes/RectangleShape2D.xml index 9c18df970b..7a1aec2021 100644 --- a/doc/classes/RectangleShape2D.xml +++ b/doc/classes/RectangleShape2D.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="RectangleShape2D" inherits="Shape2D" category="Core" version="3.0.alpha.custom_build"> <brief_description> - Rectangle Shape for 2D Physics. + Rectangle shape for 2D collisions. </brief_description> <description> - Rectangle Shape for 2D Physics. This shape is useful for modeling box-like 2D objects. + Rectangle shape for 2D collisions. This shape is useful for modeling box-like 2D objects. </description> <tutorials> </tutorials> @@ -30,6 +30,7 @@ </methods> <members> <member name="extents" type="Vector2" setter="set_extents" getter="get_extents"> + The rectangle's half extents. The width and height of this shape is twice the half extents. </member> </members> <constants> diff --git a/doc/classes/SegmentShape2D.xml b/doc/classes/SegmentShape2D.xml index 0e2c5c86f3..3b7a747bcb 100644 --- a/doc/classes/SegmentShape2D.xml +++ b/doc/classes/SegmentShape2D.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="SegmentShape2D" inherits="Shape2D" category="Core" version="3.0.alpha.custom_build"> <brief_description> - Segment Shape for 2D Collision Detection. + Segment shape for 2D collisions. </brief_description> <description> - Segment Shape for 2D Collision Detection, consists of two points, 'a' and 'b'. + Segment shape for 2D collisions. Consists of two points, [code]a[/code] and [code]b[/code]. </description> <tutorials> </tutorials> @@ -46,8 +46,10 @@ </methods> <members> <member name="a" type="Vector2" setter="set_a" getter="get_a"> + The segment's first point position. </member> <member name="b" type="Vector2" setter="set_b" getter="get_b"> + The segment's second point position. </member> </members> <constants> diff --git a/doc/classes/UndoRedo.xml b/doc/classes/UndoRedo.xml index 43e0ad7873..d450a8812e 100644 --- a/doc/classes/UndoRedo.xml +++ b/doc/classes/UndoRedo.xml @@ -108,6 +108,12 @@ Get the name of the current action. </description> </method> + <method name="get_max_steps" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> <method name="get_version" qualifiers="const"> <return type="int"> </return> @@ -116,6 +122,26 @@ This is useful mostly to check if something changed from a saved version. </description> </method> + <method name="redo"> + <return type="void"> + </return> + <description> + </description> + </method> + <method name="set_max_steps"> + <return type="void"> + </return> + <argument index="0" name="max_steps" type="int"> + </argument> + <description> + </description> + </method> + <method name="undo"> + <return type="void"> + </return> + <description> + </description> + </method> </methods> <constants> <constant name="MERGE_DISABLE" value="0"> |